Skip to content

Bug? numpy.dtype is not sortable. #1106

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

Closed
tkf opened this issue Apr 22, 2012 · 1 comment
Closed

Bug? numpy.dtype is not sortable. #1106

tkf opened this issue Apr 22, 2012 · 1 comment

Comments

@tkf
Copy link
Contributor

tkf commented Apr 22, 2012

I find this when I am writing the pull request #1098. As it is loosely related to the pull request, I am reporting here as a separate issue.

It looks like dtype does not support sorting:

>>> from numpy import dtype
>>> sorted([dtype('bool'), dtype('float64'), dtype('complex64'),
...         dtype('float64'), dtype('object')])
[dtype('bool'),
 dtype('float64'),
 dtype('complex64'),
 dtype('float64'),
 dtype('object')]

core.internals._consolidate relies sortability of dtype. Probably it is better to sort using dtype.name as I did in bae8155?

@tkf
Copy link
Contributor Author

tkf commented May 16, 2012

Fixed by da8bc6c. Thanks for merging it!

@tkf tkf closed this as completed May 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant