Why does this give me false?
isinstance(np.int32(3.0),np.int)
Why does this give me false?
isinstance(np.int32(3.0),np.int)
Because np.int
is the same as python int
data type.
Check Difference between np.int, np.int_, int, and np.int_t in cython for more info.
>>> np.int
<class 'int'>
To check with numpy.int32
, you can try with np.int_
,
>>> isinstance(np.int32(3.0),np.int_)
True