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
Behavior of negative exponentiation inconsistent between integer types #7648
Following tested using:
Python 3.5.1 (Python 3 environment created using Anaconda 4 64-bit)
Numpy 1.11.0
In [34]: np.int32(2)**-2
Out[34]: 0.25
In [35]: np.uint32(2)**-2
Out[35]: 0
In [36]: np.int64(2)**-2
Out[36]: 0.25
In [37]: np.uint64(2)**-2
Out[37]: 0.25
In [38]: np.int16(2)**-2
Out[38]: 0
In [39]: np.uint16(2)**-2
Out[39]: 0
In [40]: np.int8(2)**-2
Out[40]: 0
In [41]: np.uint8(2)**-2
Out[41]: 0
Activity
navneethc commentedon May 19, 2016
I second this.
Following tested using:
Python 3.5.1 (Python 3 environment created using Anaconda 4 64-bit)
Numpy 1.11.0
ewmoore commentedon May 19, 2016
See issue #7449 and PR #7459. The PR fixes this, but could use some review.
mhvk commentedon May 19, 2016
Just in case (have to run): Note that the array case should also keep working. In numpy 1.11:
In current master:
ewmoore commentedon May 19, 2016
Gah. That's mine.
BUG: one to any power is still 1. Broken edgecase for int arrays
ewmoore commentedon May 19, 2016
See #7651.