[Numpy-discussion] dtype and dtype.char
Charles سمير Doutriaux
doutriaux1 at llnl.gov
Tue Sep 8 15:59:08 EDT 2009
Hi,
I'm testing our code on 64bit vs 32bit
I just realized that the dtype.car is platform dependent.
I guess it's normal
her emy little test:
for t in
[numpy
.byte
,numpy
.short
,numpy
.int
,numpy
.int32
,numpy
.float
,numpy
.float32
,numpy
.double,numpy.ubyte,numpy.ushort,numpy.uint,numpy.int64,numpy.uint64]:
print 'Testing type:',t
data = numpy.array([0], dtype=t)
print data.dtype.char,data.dtype
On 64bit I get for numpy.unit64:
Testing type: <type 'numpy.uint64'>
L uint64
Whereas on 32bit i get
Testing type: <type 'numpy.uint64'>
Q uint64
Is it really normal? I guess that means I shouldn't expect the
dtype.char to be the same on all platform....
Is that right?
C.
More information about the NumPy-Discussion
mailing list