From: Martin W. <mar...@gm...> - 2006-06-14 16:00:54
|
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 "<stdin>", line 1, in ? ValueError: zero-size array to ufunc.reduce without identity >>> Cheers, Martin |