[Numpy-discussion] min() of array containing NaN

David Cournapeau cournape@gmail....
Tue Aug 12 16:53:10 CDT 2008


On Tue, Aug 12, 2008 at 10:02 AM, Thomas J. Duck <tom.duck@dal.ca> wrote:
>
>      It is quite often the case that NaNs are unexpected, so it
> would be helpful to raise an Exception.

from numpy import seterr
seterr(all = 'warn')

Do emit a warning when encountering any kind of floating point error.
You can even use raise instead of warn, in which case you will get an
exception.

cheers,

David


More information about the Numpy-discussion mailing list