On Wednesday 07 May 2008 20:38:22 Anne Archibald wrote:
> 2008/5/7 Pierre GM <[EMAIL PROTECTED]>:
> > All,
> >  Yes, there is a problem with ma.power: masking negative data should be
> >  restricted to the case of an exponent between -1. and 1. only, don't you
> >  think ?
>
> No, there's a problem with any fractional exponent (with even
> denominator): x**(3/2) == (x**3)**(1/2). 

Argh. Good point.

> The real
> problem is "how do we predict when power() is going to produce a NaN?"
 An alternative would be to forget about it: let power() output NaNs, and fix 
them afterwards with fix_invalid.

_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to