[Numpy-discussion] Release blockers for 1.4.0 ?
Tue Dec 8 02:33:31 CST 2009
On Dec 8, 2009, at 2:31 AM, David Cournapeau wrote:
> Pierre GM wrote:
>> 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
> I don't think there is an easy (or any) way to disable this at module
> level. Please be sure to always do so in a try/finally (like you would
> handle a file object to guarantee it is always closed, for example),
> because otherwise, test failures and SIGINT (ctrl+C) will pollute the
> user environment.
Will try. We're still supporting 2.3, right ?
> Setting/unsetting the FPU state definitely has a cost. I don't know how
> significant it would be for your precise case, though: is the cost
> because of setting/unsetting the state in the test themselves or ? We
> may be able to improve the situation later on once we have better numbers.
I can't tell you, unfortunately... And I'm afraid I won't have too much time to write some benchmarks.
> I have already committed the removal of the global np.seterr in the
> trunk. I feel like backporting this one to 1.4.x is a good idea (because
> it could be considered as a regression), but maybe someone has a strong
> case against it.
Well, there's another cosmetic issue that nags me: when using np functions instead of their ma equivalents on masked arrays, a warning might be raised. I could probably find a workaround with __array_prepare__, but it may take some time (and it probably won't be very pretty). So couldn't we keep things the way they are for 1.4.0, and get the fixes for 1.5 only ?
More information about the NumPy-Discussion