[Numpy-discussion] bug in array instanciation?

Emmanuel Mayssat emayssat at gmail.com
Fri Jan 27 16:17:36 EST 2012


In [20]: dt_knobs =
[('pvName',(str,40)),('start','float'),('stop','float'),('mode',(str,10))]

In [21]: r_knobs = np.recarray([],dtype=dt_knobs)

In [22]: r_knobs
Out[22]:
rec.array(('\xa0\x8c\xc9\x02\x00\x00\x00\x00(\xc8v\x02\x00\x00\x00\x00\x00\xd3\x86\x02\x00\x00\x00\x00\x10\xdeJ\x02\x00\x00\x00\x00\x906\xb9\x02',
1.63e-322, 1.351330465085e-312, '\x90\xc6\xa3\x02\x00\x00\x00\x00P'),
      dtype=[('pvName', '|S40'), ('start', '<f8'), ('stop', '<f8'),
('mode', '|S10')])

why is the array not empty?
--
E



More information about the NumPy-Discussion mailing list