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

David Cournapeau cournape at gmail.com
Tue Aug 12 17:53:10 EDT 2008


On Tue, Aug 12, 2008 at 10:02 AM, Thomas J. Duck <tom.duck at 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