@pbstark @akglazer I believe this is the last issue before we are ready to release new versions of cryptorandom and permute. Let me know if my change makes sense or whether we should use something else to replace np.int (details below).
You can read more in the above link, but this is the recommendation:
For np.int a direct replacement with np.int_ or int is also good and will not change behavior, but the precision will continue to depend on the computer and operating system. If you want to be more explicit and review the current use, you have the following alternatives:
- np.int64 or np.int32 to specify the precision exactly. This ensures that results cannot depend on the computer or operating system.
- np.int_ or int (the default), but be aware that it depends on the computer and operating system.
- The C types: np.cint (int), np.int_ (long), np.longlong.
- np.intp which is 32bit on 32bit machines 64bit on 64bit machines. This can be the best type to use for indexing.
I went with np.int64, but I am not sure that is what you want. The advantage of using np.int64 is that behavior should be consistent across computers/operating systems. This shouldn't change behavior on Mac or Linux, but Windows will now use 64 bit integers (instead of 32 bit).
@pbstark @akglazer I believe this is the last issue before we are ready to release new versions of cryptorandom and permute. Let me know if my change makes sense or whether we should use something else to replace
np.int
(details below).np.int
is deprecated https://numpy.org/devdocs/release/1.20.0-notes.html#deprecationsYou can read more in the above link, but this is the recommendation:
I went with
np.int64
, but I am not sure that is what you want. The advantage of usingnp.int64
is that behavior should be consistent across computers/operating systems. This shouldn't change behavior on Mac or Linux, but Windows will now use 64 bit integers (instead of 32 bit).