[Numpy-discussion] How do I test if an array contains NaN ?
fperez.net at gmail.com
Thu Jan 4 18:25:09 EST 2007
On 1/4/07, Robert Kern <robert.kern at gmail.com> wrote:
> Sebastian Haase wrote:
> > Hi!
> > Simple question:
> > How do I test if an array contains NaN ?
> > Or others like inf ...?
> In : isinf?
> Type: ufunc
> Base Class: <type 'numpy.ufunc'>
> Namespace: Interactive
> y = isinf(x) returns True where x is +inf or -inf
It's probably worth mentioning that IPython has (thanks to a user
contributed implementation) search capabilities besides tab completion
(which requires you to at least know the start of the string you
In : N.*nan*?
In : N.*inf*?
This can be very useful when querying a package for something you only
vaguely know how it might be called. This just prints the list of
names to stdout, you then need to actually type the one you want.
More information about the NumPy-Discussion