[Numpy-discussion] Apropos ticked #913

Pauli Virtanen pav@iki...
Wed Mar 4 14:57:15 CST 2009


Wed, 04 Mar 2009 13:18:55 -0700, Charles R Harris wrote:
[clip]
> 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.

Aren't the nonpropagating versions of `amax` and `amin` called `nanmax` 
and `nanmin`? But these are functions, not array methods.

What does the `f` in the beginning of `fmax` and `fmin` stand for?

-- 
Pauli Virtanen



More information about the Numpy-discussion mailing list