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
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]
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:
I guess since I need to divide by 4 I'll just bitshift, but this was kinda unexpected for me.
Numpy/Python version information:
installed through conda / conda-forge
xref: #5745
The text was updated successfully, but these errors were encountered: