[Numpy-discussion] Proposal to make power return float, and other such things.

Nathaniel Smith njs at pobox.com
Tue Feb 18 08:46:10 EST 2014

On 18 Feb 2014 07:07, "Robert Kern" <robert.kern at gmail.com> wrote:
> On Tue, Feb 18, 2014 at 12:00 PM, Nathaniel Smith <njs at pobox.com> wrote:
> > Perhaps integer power should raise an error on negative powers? That way
> > people will at least be directed to use arr ** -1.0 instead of silently
> > getting nonsense from arr ** -1.
> Controllable by np.seterr(invalid=...)? I could get behind that.

I'm not sure the np.seterr part would work or be a good idea, given that we
have no way to return or propagate NaN... I vote for just an unconditional

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140218/c1ad4b04/attachment.html>

More information about the NumPy-Discussion mailing list