[Numpy-discussion] float32 is not a float ?

Charles Doutriaux doutriaux1@llnl....
Thu Apr 10 13:38:07 CDT 2008


Hello,

I guess this maybe "normal" but it breaks a lot of thing when conterting 
from Numeric

 >>> a=numpy.ones(5,dtype=numpy.float32)
 >>> isinstance(a[0],float)
False
 >>>

float64 works...

I can see why one could argue for returning False, but then the 
converter might be too zealous
things that used to work like:
if type(item) in [types.IntType, types.FloatType]:

or:

 isinstance(item, types.FloatType)

now fail,

should we be concerned? should we consider returning True ?

Thanks,

C.



More information about the Numpy-discussion mailing list