diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-29 08:15:15 -0700 |
---|---|---|
committer | Sebastian Berg <sebastianb@nvidia.com> | 2022-10-12 10:41:40 +0200 |
commit | 89cfcf0a31f07dfd33dd0b462619e7202d807b6b (patch) | |
tree | a3fd999aedcf2e5ee3cf7e0380d5a5396decb46f /numpy/array_api/_utility_functions.py | |
parent | 0a0f96fe86cea5009730def695c27b5a334bd6c1 (diff) | |
download | numpy-89cfcf0a31f07dfd33dd0b462619e7202d807b6b.tar.gz |
MAINT: Use Python integers for int to array of uint32 calculation
The new weak promotion preserves the original type, this makes the
`//= 2**32` fail for certain inputs. The alternative would be
typing that as `np.int64(2**32)`, but using Python integers seems
easier and cleaner.
The code was effectively OK before, since the inputs were guaranteed
signed (or Python integers) at that point and 2**32 would have been
considered like a NumPy `int64`. (Which would be an alternative fix.)
Diffstat (limited to 'numpy/array_api/_utility_functions.py')
0 files changed, 0 insertions, 0 deletions