[Numpy-discussion] bug in oldnumeric.ma
Mon May 12 10:56:23 CDT 2008
I fixed the power function in numpy.ma following Anne's suggestion: compute
first, mask the problems afterwards. It's a quick and dirty fix that crashes
if the user has set its error system to raise an exception on invalid
(np.seterr(invalid='raise')), but it works otherwise and keeps subclasses
(such as TimeSeries).
I will have to modify the .__pow__ method so that ma.power is called: right
now, a**b calls ndarray(a).__pow__(b), which may yield NaNs and Infs.
What should I do with oldnumeric.ma.power ? Try to fix it the same way, or
leave the bug ? I'm not that enthusiastic to have to debug the old package,
but if it's part of the job...
More information about the Numpy-discussion