[Numpy-discussion] maximmum.reduce and nans (original) (raw)
Martin Wiechert martin.wiechert at gmx.de
Wed Jun 14 11:58:03 EDT 2006
- Previous message (by thread): [Numpy-discussion] numpy.test() fails on Redhat Enterprise and Solaris
- Next message (by thread): [Numpy-discussion] maximmum.reduce and nans
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi list,
does anybody know, why
maximum.reduce (())
does not return -inf?
Looks very natural to me and as a byproduct maximum.reduce would ignore nans, thereby removing the need of nanmax etc.
The current convention gives
from numpy import * maximum.reduce ((1,nan)) 1.0 maximum.reduce ((nan, 1)) nan maximum.reduce (()) Traceback (most recent call last): File "", line 1, in ? ValueError: zero-size array to ufunc.reduce without identity
Cheers, Martin
- Previous message (by thread): [Numpy-discussion] numpy.test() fails on Redhat Enterprise and Solaris
- Next message (by thread): [Numpy-discussion] maximmum.reduce and nans
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]