From: Yves <yve...@gm...> - 2006-10-30 10:53:52
|
Forget it. N.isnan() does the job. YVES On Mon, Oct 30, 2006 at 11:47:57AM +0100, Yves wrote: > Hi, > > Is there a way of checking for nan's in an array, as comparing to N.nan > doesn't seem to work. > > In [1]: import numpy as N > > In [2]: a = N.asarray(0.)/0 > Warning: invalid value encountered in divide > > In [3]: a > Out[3]: nan > > In [4]: a==N.nan > Out[4]: False > > In [5]: b = a.copy() > > In [6]: a==b > Out[6]: False > > In [7]: b > Out[7]: nan > > In [8]: N.__version__ > Out[8]: '1.0.dev3390' > > > Many thanks, > YVES > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion |