[Numpy-discussion] What is the different between nanmin and min ?

Robert Kern robert.kern@gmail....
Wed Jul 18 13:30:01 CDT 2007

Timothy Hochberg wrote:

> The time is one issue. Another is that ignoring NaNs is only correct if
> you are treating NaNs as missing values. If instead you are treating
> them as non numbers, the results of some bogus computation, then raising
> an error is a more appropriate response. If one was going to take the
> time to check for NaNs, one strategy that I would probably support would
> be to ignore the NaNs, but set the invalid flag. If the error state for
> invalid was set to ignore, then this would work as the missing value
> camp likes, otherwise it would raise an error or signal a warning.

I'd almost be willing to make max() and min() always ignore quiet NaNs. The C99
standard requires this, for example, (c.f. section F.9.9.2 of the C99 standard).

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

More information about the Numpy-discussion mailing list