On Sat, Jun 4, 2016 at 11:22 AM, Charles R Harris <charlesr.har...@gmail.com > wrote:
> Hi All, > > I've made a new post so that we can make an explicit decision. AFAICT, the > two proposals are > > > 1. Integers to negative integer powers raise an error. > 2. Integers to integer powers always results in floats. > > My own sense is that 1. would be closest to current behavior and using a > float exponential when a float is wanted is an explicit way to indicate > that desire. OTOH, 2. would be the most convenient default for everyday > numerical computation, but I think would more likely break current code. I > am going to come down on the side of 1., which I don't think should cause > too many problems if we start with a {Future, Deprecation}Warning > explaining the workaround. > Note that current behavior in 1.11 is such a mess ``` In [5]: array([0], dtype=int64) ** -1 Out[5]: array([-9223372036854775808]) In [6]: array([0], dtype=uint64) ** -1 Out[6]: array([ inf]) ``` That the simplest approach might be to start by raising an error rather than by trying to maintain current behavior and issuing a warning. Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion