[Numpy-discussion] dtype inconsistancy?
humufr at yahoo.fr
humufr at yahoo.fr
Wed Nov 29 13:41:01 CST 2006
Hi,
I think that the following command and result are a little bit inconsistant
and a source of error. I don't understand why: dtype=float32 for a result
when it's invalid in the definition.
N.
In [8]: a = numpy.array([1],dtype=float32)
---------------------------------------------------------------------------
exceptions.NameError Traceback (most recent
call last)
NameError: name 'float32' is not defined
In [9]: a = numpy.array([1],dtype='float32')
In [10]: a
Out[10]: array([ 1.], dtype=float32)
In [11]: numpy.array([ 1.], dtype=float32)
---------------------------------------------------------------------------
exceptions.NameError Traceback (most recent
call last)
NameError: name 'float32' is not defined
More information about the Numpy-discussion
mailing list