[Numpy-discussion] ANN: NumPy 1.5.0 beta 2
Charles R Harris
Tue Aug 17 22:52:59 CDT 2010
On Tue, Aug 17, 2010 at 9:11 PM, Christoph Gohlke <email@example.com> wrote:
> On 8/17/2010 1:02 PM, Charles R Harris wrote:
> > On Tue, Aug 17, 2010 at 1:38 PM, Christoph Gohlke <firstname.lastname@example.org
> > <mailto:email@example.com>> wrote:
> > On 8/17/2010 8:23 AM, Ralf Gommers wrote:
> > I am pleased to announce the availability of the second beta of
> > NumPy
> > 1.5.0. This will be the first NumPy release to include support
> > Python 3, as well as for Python 2.7.
> > Please try this beta and report any problems on the NumPy
> > mailing list.
> > Especially with Python 3 testing will be very useful. On Linux
> > and OS X
> > building from source should be straightforward, for Windows a
> > installer is provided. There is one important known issue on
> > left, in fromfile and tofile (ticket 1583).
> > Binaries, sources and release notes can be found at
> > https://sourceforge.net/projects/numpy/files/
> > <https://sourceforge.net/projects/numpy/files/>
> > Enjoy,
> > Ralf
> > NumPy 1.5.0 beta 2 built with msvc9/mkl for Python 2.7 and 3.1 (32
> > and 64 bit) still reports many (> 200) warnings and three known test
> > failures/errors. Nothing serious, but it would be nice to clean up
> > before the final release.
> > The warnings are of the type "Warning: invalid value encountered in"
> > for the functions reduce, fmax, fmin, logaddexp, maximum, greater,
> > less_equal, greater_equal, absolute, and others. I do not see any of
> > these warnings in the msvc9 builds of numpy 1.4.1.
> > The warnings were accidentally turned off for earlier versions of Numpy.
> > I expect these warnings are related to nans and probably due to problems
> > with isnan or some such. Can you take a closer look? The fmax function
> > should be easy to check out.
> > <sniip>
> > Chuck
> Thanks for the hint. Warnings are issued in the test_umath test_*nan*
> functions. The problem can be condensed to this statement:
> >>> numpy.array([numpy.nan]) > 0
> Warning: invalid value encountered in greater
> array([False], dtype=bool)
> When using msvc, ordered comparisons involving NaN raise an exception
> , i.e. set the 'invalid' x87 status bit, which leads to the warning
> being printed. I don't know if this violates IEEE 754 or C99 standards
> but it does not happen with the gcc builds. Maybe
> seterr(invalid='ignore') could be added to the test_*nan* functions?
>  http://msdn.microsoft.com/en-us/library/e7s85ffb%28v=VS.90%29.aspx
The c standard is a bit flexible with respect to nans. For instance, if
quiet nans aren't available macros that require quiet nans can't be
implemented. But it seems to me that msvc is a bit short on the numerical
side, as it has always been. Not only does the precise option disable bogus
optimizations like x - x == 0 (good), it raises exceptions for ordered nan
comparisons (bad). There doesn't seem to be any reasonable combination of
features. I wonder if this "feature" is implemented by having signaling nans
Anyway, I don't know the best way to handle this. We can probably redo most
of the code to avoid the comparisons in the nan case and that might be the
way to go for 2.0, but for 1.5 a known fail might be appropriate.
Thanks for looking into this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion