[Numpy-discussion] Apropos ticked #913

Charles R Harris charlesr.harris@gmail....
Wed Mar 4 14:18:55 CST 2009


Hi David,

It isn't clear to me that trac is mailing out the ticket reponses, so I'm
posting to the list.

> #913: max is bogus if nan is in the array
>
--------------------+-------------------------------------------------------
>  Reporter:  cdavid  |        Owner:  somebody
>     Type:  defect  |       Status:  closed
> Priority:  normal  |    Milestone:  1.3.0
> Component:  Other   |      Version:  none
>  Severity:  major   |   Resolution:  fixed
>  Keywords:          |
>
--------------------+-------------------------------------------------------
>
> Comment(by cdavid):
>
> What's the status on this, Chuck ? What do max/min and amax/amin do ?

There are python max/min and their behaviour depends on the scalar type. I
haven't looked at the numpy scalars to see precisely what they do.

Numpy max/min are aliases for amax/amin defined when the core is imported.
The functions amax/amin in turn map to the array methods max/min which call
the maximum.reduce/minimum.reduce ufuncs, so they all propagate nans, i.e.,
if the array contains a nan, nan will be the return value.

The nonpropagating comparisons are the ufuncs fmax/fmin and there are no
corresponding array methods. I think fmax/fmin should be renamed
fmaximum/fminimum before the release of 1.3 and the names fmax/fmin reserved
for the reduced versions to match the names amax/amin. I'll do that if there
are no objections.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090304/5b7496ed/attachment.html 


More information about the Numpy-discussion mailing list