[Numpy-discussion] Release blockers for 1.4.0 ?

Pierre GM pgmdevlist at gmail.com
Tue Dec 8 02:34:06 EST 2009


On Dec 7, 2009, at 11:15 PM, David Cournapeau wrote:
> Charles R Harris wrote:
>>    No, it is a consequence of errors being set to ignored in numpy.ma
>>    <http://numpy.ma>:

Oopsie...

A bit of background first;
In the first implementations of numpy.core.ma, the approach was to get rid of the data that could cause problem beforehand by replacing them with safe values. Turned out that finding these data is not always obvious (cf the problem of defining a domain when dealing with exponents that we discussed a while back on this list), and that all in all, it is faster to compute first and deal with the problems afterwards. Of course, the user doesn't need the warnings if something goes wrong, so disabling them globally looked like a way to go. I thought the disabling would be only for numpy.ma, though

Anyhow, running numpy.ma.test() on 1.5.x, I get 36 warnings by getting rid of the np.seterr(all='ignore') in numpy.ma.core. I can go down to 2 by saving the seterr state before the computations in _Masked/DomainUnary/BinaryOperation and restoring it after the computation. I gonna try to find where the 2 missing warnings come from.
The 281 tests + 36 warnings take 4.087s to run, the 2 warning version 5.95s (but I didn't try to go to much into timing details...)

So, what do you want me to do guys ? Commit the fixes to the trunk ? Backporting them to 1.4.x ?




More information about the NumPy-Discussion mailing list