-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Adding floating hex (ala float.fromhex) support to loadtxt converter. (Issue 1924) #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add _floatconv to npyio.py as a default floating point converter. This uses float() as a type conversion with a fallback on (ValueError) to float.fromhex().
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. |
feat: Add vqshrn_n_s16
Add _floatconv to npyio.py as a default floating point converter. This
uses float() as a type conversion with a fallback on (ValueError) to
float.fromhex().
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?