You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [1]: import numpy as np
In [2]: import collections
In [3]: isinstance(3.14, collections.Hashable)
Out[3]: True
In [4]: isinstance(np.float64(3.14), collections.Hashable)
Out[4]: False
On Python 2.7, the last output here is True (which is the correct value)
The text was updated successfully, but these errors were encountered:
This peculiarity seems to be limited in scope - I only see it with np.float(64) in my short tests.
In [4]: isinstance(np.float32(3.14), collections.Hashable)
Out[4]: True
In [5]: isinstance(np.float64(3.14), collections.Hashable)
Out[5]: False
In [6]: isinstance(np.float128(3.14), collections.Hashable)
Out[6]: True
In [7]: isinstance(np.float(3.14), collections.Hashable)
Out[7]: True
In [8]: isinstance(np.int(3.14), collections.Hashable)
Out[8]: True
I'm not sure where these types are implemented, but I think this afternoon I'm going to poke around the code and look to see what differences there are between the different float types.
xref: pandas-dev/pandas#9276
For example:
On Python 2.7, the last output here is
True
(which is the correct value)The text was updated successfully, but these errors were encountered: