You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
uint64 converted to float when dividing by python integer #13057
I totally get why it is a cause for concern when adding to an int, but I feel like floor division by a positive should be expected to return an integer "safe".
Reproducing code example:
importnumpyasnpnp.uint64(0) //4
Out[2]: -0.0
I guess since I need to divide by 4 I'll just bitshift, but this was kinda unexpected for me.
Numpy/Python version information:
In [3]: import sys, numpy; print(numpy.__version__, sys.version)
1.16.1 3.7.2 (default, Dec 29 2018, 06:19:36)
[GCC 7.3.0]
Activity
seberg commentedon Nov 19, 2022
Closing as duplicate of gh-22624