-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Ticket #1793 #123
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
Ticket #1793 #123
Conversation
file is empty. The unit test has been rewritten to check for this and the test is passed.
Giving a warning (including file name) that the file is empty may be useful; otherwise this will just lead to errors later on with a less comprehensible error message for users who do not expect their file to be empty. |
Great idea, what's the canonical way of doing this? |
Use a UserWarning. Something like:
|
I think I've got it, looks OK to me at least. UserWarning is the default, it seems. |
That doesn't include the filename yet - that can be very helpful if you're batch processing files. |
…y file in genfromtxt
I hope that should do it! |
Not quite, the .format method was only introduced in Python 2.6. You need the old-fashioned %s instead, we need Python 2.4 compatibility. |
|
||
test = np.genfromtxt(data) | ||
ctrl = np.array([]) | ||
assert_equal(test, ctrl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could probably shorten this to simply assert_equal(test, [])
…ead. also, removed an unneeded line of code in corresponding unit test.
I keep living in the future, I forgot about python2.4! stefanv - I did as you suggested. |
Merged, thanks. |
feat: Add vrsqrte_f32
This is a quick fix of ticket #1793, exactly as requested. The corresponding test has been rewritten and is now passed.
Another commit simply moves an import statement. I think I made a pull request for that at some earlier stage, apologies for the mess if so...