I'm running python 2.7 and numpy 1.15.
I get:
>>> import numpy as np
>>> np.issubdtype(4, float)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/brianp/work/cyan/venv/lib/python2.7/site-packages/numpy/core/numerictypes.py", line 714, in issubdtype
arg1 = dtype(arg1).type
TypeError: data type not understood
Did something change so that it used to work with values, but now it only works with types?
As per an answer below:
>>> np.issubdtype(4, np.float)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/brianp/work/cyan/venv/lib/python2.7/site-packages/numpy/core/numerictypes.py", line 714, in issubdtype
arg1 = dtype(arg1).type
TypeError: data type not understood
I should add that
>>> np.issubdtype(type(4), np.float)
False
works... but the code USED to work without type()...