[Numpy-discussion] Release blockers for 1.4.0 ?
Wed Dec 9 01:41:55 CST 2009
2009/12/8 Robert Kern <email@example.com>:
> On Tue, Dec 8, 2009 at 15:25, Pierre GM <firstname.lastname@example.org> wrote:
>> On Dec 8, 2009, at 12:54 PM, Robert Kern wrote:
>>> As far as I can tell, the faulty global seterr() has been in place
>>> since 1.1.0, so fixing it at all should be considered a feature
>>> change. It's not likely to actually *break* things except for doctests
>>> and documentation. I think I fall in with Chuck in suggesting that it
>>> should be changed in 1.5.0.
>> OK. I'll work on fixing the remaining issues when a np function is applied on a masked array.
>> FYI. most of the warnings can be fixed in _MaskedUnaryOperation and consorts with:
>> err_status_ini = np.geterr()
>> np.seterr(divide='ignore', invalid='ignore')
>> result = self.f(da, db, *args, **kwargs)
>> Is this kind of fix acceptable ?
> olderr = np.seterr(divide='ignore', invalid='ignore')
> result = self.f(da, db, *args, **kwargs)
Doesn't this risk a ctrl-C after the seterr but before the try? How about:
olderr = np.geterr()
(I guess this would be why context managers were invented...)
More information about the NumPy-Discussion