[Numpy-discussion] concatenation changes dtype
oliphant.travis at ieee.org
Sat Sep 16 17:36:39 CDT 2006
Martin Wiechert wrote:
> Hi list,
> Apparently r_[x,x] does not necessarily have the same dtype as x:
>>>> from numpy import *
>>>> dt = dtype ([('a', 'b'), ('f4', 'i4')])
>>>> x = zeros ((1,), dt)
> dtype([('a', '|i1'), ('f4', '<i4')])
Did you mean to make a data-type that was a 1-byte integer followed by a
4-byte integer with field names of 'a' and 'f4'?
Perhaps you meant:
which is a 4-byte float followed by a 4-byte integer.
More information about the Numpy-discussion