Closed skarrea closed 1 year ago
Oops I closed this by mistake.
Thanks for catching this! According to the release notes, np.int
is the same as int
. In that case, would it make a difference if we switched to 'int'?
Not really. I would guess it comes with a minimal performance penalty since int
will be interpreted as np.int_
(since numpy arrays can't contain int
). np.int_
will then default to np.int32
or np.int64
depending on the system.
You're right; it's best to avoid that penalty by directly specifying np.int32
ourselves.
With the current requirements in setup.py numpy >=1.20 will be installed where
np.int
is deprecated.Changing all occurrences of
np.int
tonp.int32
is compatible with both1.19.5 <= numpy <= 1.20.0
, andnumpy >= 1.20.0
(tested with 1.23.5).np.int
can also be changed tonp.int64
if necessary.