[Numpy-discussion] dtype inconsistancy?

Pierre GM pgmdevlist at gmail.com
Wed Nov 29 13:52:53 CST 2006

On Wednesday 29 November 2006 14:41, humufr at yahoo.fr wrote:
> 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.

I'm afraid I don;t understand the last sentence...
But anyway:
float32 is defined by numpy. If you just used 
>>>import numpy
>>>numpy.array([ 1.], dtype=numpy.float32)
will work.
Using 'float32' as a string, you let the dtype function guess what you mean.

More information about the Numpy-discussion mailing list