[Numpy-discussion] Integers to negative integer powers, time for a decision.
rmay31 at gmail.com
Mon Oct 10 12:38:37 EDT 2016
On Sun, Oct 9, 2016 at 12:59 PM, Stephan Hoyer <shoyer at gmail.com> wrote:
> On Sun, Oct 9, 2016 at 6:25 AM, Sebastian Berg <sebastian at sipsolutions.net
> > wrote:
>> For what its worth, I still feel it is probably the only real option to
>> go with error, changing to float may have weird effects. Which does not
>> mean it is impossible, I admit, though I would like some data on how
>> downstream would handle it. Also would we need an int power? The fpower
>> seems more straight forward/common pattern.
>> If errors turned out annoying in some cases, a seterr might be
>> plausible too (as well as a deprecation).
> I agree with Sebastian and Nathaniel. I don't think we can deviating from
> the existing behavior (int ** int -> int) without breaking lots of existing
> code, and if we did, yes, we would need a new integer power function.
> I think it's better to preserve the existing behavior when it gives
> sensible results, and error when it doesn't. Adding another function
> float_power for the case that is currently broken seems like the right way
> to go.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion