-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Open
Labels
Description
np.dtype(int) is int64, not python int as expected.
>>> import numpy as np
>>> a = np.array([2],dtype = np.dtype(int))
>>> a.dtype
dtype('int64')
>>> a**63
array([-9223372036854775808])
>>> np.version.version
'1.14.3'
np.dtype(int) is expected to be Python compatible integer.
Specifically Python integers have unlimited precision, but numpy is limited to only 63 binary digits.
Reactions are currently unavailable