Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: issubdtype produces inconsistent result for float32 and float64 #9480

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
eric-wieser opened this issue Jul 27, 2017 · 2 comments
Closed

Comments

@eric-wieser
Copy link
Member

>>> np.issubdtype(np.float32, np.dtype('float64'))
True
>>> np.issubdtype(np.float32, np.float64)
False
@eric-wieser
Copy link
Member Author

This was seemingly broken in 325aad6.

It's not at all clear what the motivation was, since that commit contains no tests or comments

@eric-wieser
Copy link
Member Author

But wait, there's more!

>>> np.issubdtype(int, basestring) # py2
True
>>> np.issubdtype(np.int16, int) , np.issubdtype(np.uint16, int) # int actually means signed int
(True, False)

eric-wieser added a commit to eric-wieser/numpy that referenced this issue Aug 1, 2017
eric-wieser added a commit to eric-wieser/numpy that referenced this issue Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant