[Numpy-discussion] fread codes versus numpy types
Glen W. Mabey
Glen.Mabey at swri.org
Wed Jun 28 10:44:11 CDT 2006
Hello,
I see the following character codes defined in scipy (presumably) for
use with scipy.io.fread() :
In [20]:scipy.Complex
Out[20]:'D'
In [21]:scipy.Complex0
Out[21]:'D'
In [22]:scipy.Complex128
Out[22]:'G'
In [23]:scipy.Complex16
Out[23]:'F'
In [24]:scipy.Complex32
Out[24]:'F'
In [25]:scipy.Complex64
Out[25]:'D'
In [26]:scipy.Complex8
Out[26]:'F'
Then I see the following scalar types also defined:
In [27]:scipy.complex64
Out[27]:<type 'complex64scalar'>
In [28]:scipy.complex128
Out[28]:<type 'complex128scalar'>
In [29]:scipy.complex256
Out[29]:<type 'complex256scalar'>
which correspond to types that exist within the numpy module. These
names seem to conflict in that (unless I misunderstand what's going on)
scipy.complex64 actually occupies 64 bits of data (a 32-bit float for
each of {real, imag}) whereas scipy.Complex64 looks like it occupies 128
bits of data (a 64-bit double for each of {real, imag}).
Is there something I'm missing, or is this a naming inconsistency?
Glen
More information about the Numpy-discussion
mailing list