Add _floatconv to npyio.py as a default floating point converter. This
uses float() as a type conversion with a fallback on (ValueError) to
I've never submitted a github style patch to a project before. I hope I'm not jumping the gun by submitting a pull request for a feature without any discussion after my feature request #1924. What's the appropriate etiquette?
Added support for float hex format to loadtxt.
You can submit a pull request directly, but in case of a new feature it's usually better to discuss the idea on-list first. Tickets on Trac often take a long time before someone looks at them unfortunately.
A few remarks about your code:
Looks like float.fromhex is new in Python 2.6, how does this behave in 2.4/2.5?
I can confirm that float.fromhex is missing from Python 2.5. So unless the implementation can be changed this addition will have to wait. The Python code for this is in C which I suppose we could add to _compiled_base.c, but unless someone wants this feature badly and is willing to port the C code, I don't think it is worth the hassle..
I suppose we could also make the feature depend on the Python version.
Now that 2.4 and 2.5 have been dropped, we can take a second look at this. @claumann Want to rebase this?
Can revisit this now, for numpy >= 1.8 only python >= 2.6 is supported.
Cleaned up in #5504.