[Numpy-discussion] numpy.test(): invalid value encountered in {isinf, divide, power, ...}

Pierre GM pgmdevlist@gmail....
Wed Jan 20 16:23:01 CST 2010


On Jan 20, 2010, at 4:57 PM, Darren Dale wrote:
> I haven't been following development on the trunk closely, so I
> apologize if this is a known issue. I didn't see anything relevant
> when I searched the list.
> 
> I just updated my checkout of the trunk, cleaned out the old
> installation and build/, and reinstalled. When I run the test suite
> (without specifying the verbosity), I get a slew of warnings like:
> 
> Warning: invalid value encountered in isinf
> Warning: invalid value encountered in isfinite
> 
> I checked on both OS X 10.6 and gentoo linux, with similar results.
> The test suite reports "ok" at the end with 5 known failures and 4
> skipped tests.


That comes from numpy.ma. 
On the SVN, we got rid of a line in ma.core that forced the warnings to be silent module-wise. Instead, silencing the warnings is done inside each ma function. The issue shows up when you apply a np function on a masked_array: the warnings pop up because there's nothing to silence them, but everything should run smoothly.
Should, because I'm pretty sure there's a catch somewhere. I'll have to go and check an alternative approach using your __array_prepare__.
So yes, everything's fine (albeit noisy)



More information about the NumPy-Discussion mailing list