[Numpy-discussion] maximmum.reduce and nans
martin.wiechert at gmx.de
Wed Jun 14 10:58:03 CDT 2006
does anybody know, why
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))
>>> maximum.reduce ((nan, 1))
>>> maximum.reduce (())
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: zero-size array to ufunc.reduce without identity
More information about the Numpy-discussion