Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11.9k
BUG: Make dtype.descr error for out-of-order fields.#10562
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| y=self.data[['col2','col1']] | ||
| assert_equal(y.dtype.names, ('col2','col1')) | ||
| assert_raises(ValueError,lambda:y.dtype.descr) | ||
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.
These tests aren't valid in 1.14.1. I would replace the entire function with
dt=dtype({'names': ['a','b'],'formats': ['i4','i4'],'offsets': [4,0]})y=np.rec.fromrecords([(1,2), (4,5)],dtype=dt)assert_raises(ValueError,lambda:y.dtype.descr)
ahaldane commentedFeb 9, 2018
I am going to try out the online editor to put my fixup, let me know if it is annoying or doesn't work somehow. |
charris commentedFeb 9, 2018
Thanks for the fix, Allan. |
ahaldane commentedFeb 9, 2018
No, because master has the copy->view change. This is for the 1.14.x branch where that was reverted. |
Uh oh!
There was an error while loading.Please reload this page.
Backport of#10391.
cc@ahaldane since#6053 exposes this to user code more often.
Currently returns garbage, Now