[SciPy-user] What about 'None'? Comment about nan...

Martin Kuemmel mkuemmel at eso.org
Thu Nov 30 01:14:08 CST 2006


Hi,

this question may (as well) be trivial for some of us, but bothers
me for some time. It is:

 >>> gaga = numpy.array([1.0,2.0,None])
 >>> gaga
array([1.0, 2.0, None], dtype=object)

The type of the array is 'object'. Is there a way to have 'None'
in a numerical array type? Any trick, idea or recipe?


About nan: It is great that 'numpy.NAN' exists, but the handbook
            says nothing about it. Are there more glorious, but
            hidden constants or functions or methods?

Cheers,
Martin

-- 
+----------------------------------------------------------------------+
| Martin Kuemmel                              E-mail: mkuemmel at eso.org |
| Space Telescope European Co-ordinating Facility                      |
| European Southern Observatory                     Room: ESO-IPP L125 |
| Karl-Schwarzschild-Strasse 2                 Phone: +49 89 32006-817 |
| D-85748 Garching                             FAX:   +49 89 32006-703 |
| Germany                         WWW: http://www.stecf.org/~mkuemmel/ |
|    __o                                                               |
|  _ \<._                                                              |
+_(_)/_(_)_____________________________________________________________+


More information about the SciPy-user mailing list