[Numpy-discussion] ANN: NumPy 1.5.0 beta 2

David david@silveregg.co...
Wed Aug 18 00:00:11 CDT 2010


On 08/18/2010 01:56 PM, Charles R Harris wrote:
>
>
> On Tue, Aug 17, 2010 at 9:11 PM, Christoph Gohlke <cgohlke@uci.edu
> <mailto:cgohlke@uci.edu>> wrote:
>
>
>
>     On 8/17/2010 1:02 PM, Charles R Harris wrote:
>      >
>      >
>      > On Tue, Aug 17, 2010 at 1:38 PM, Christoph Gohlke
>     <cgohlke@uci.edu <mailto:cgohlke@uci.edu>
>      > <mailto:cgohlke@uci.edu <mailto:cgohlke@uci.edu>>> 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 for
>      >         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 binary
>      >         installer is provided. There is one important known issue
>     on Windows
>      >         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
>     [1], 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?
>
>     [1] http://msdn.microsoft.com/en-us/library/e7s85ffb%28v=VS.90%29.aspx
>
>
> OK, this does seem to be the standard. For instance
>
> The isless macro determines whether its first argument is less than its
> second
> argument. The value of isless(x, y) is always equal to (x) < (y); however,
> unlike (x) < (y), isless(x, y) does not raise the ‘‘invalid’’ floating-point
> exception when x and y are unordered.

Yes, it is - but I cannot reproduce the INVALID FPU exception on Linux 
when using e.g. int a = (Nan > 1). I don't know what's up with that, as 
the glibc says it should,

cheers,

David


More information about the NumPy-Discussion mailing list