Assign NaN, get zero

Lisandro Dalcin dalcinl at gmail.com
Sat Nov 11 16:30:06 EST 2006


On 11/11/06, Stefan van der Walt <stefan at sun.ac.za> wrote:
> NaN (or inf) is a floating point number, so seeing a zero in integer
> representation seems correct:
>
> In [2]: int(N.nan)
> Out[2]: 0L
>

Just to learn myself: Why int(N.nan) should be 0? Is it C behavior?

-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594

-------------------------------------------------------------------------
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




More information about the NumPy-Discussion mailing list