Let's say I have two structured arrays with dtypes as per below
>>> getdat.dtype
dtype([('Tstamp', '|O4'), ('Vf', '<f4'), ('Vq', '<f4'), ('Sf', '<f4'),
('Sq', '<f4'), ('Bt', '<f4'), ('SPL', '<f4')])
>>> out.dtype
dtype([('Viscosity_cSt', '<f4'), ('Density_kgm3', '<f4'), ('GVF', '<f4')])
Then merging this per the below gives an error. Why?
>>> rfn.merge_arrays((getdat, out), flatten = True, usemask = False,
asrecarray=False)
Traceback (most recent call last):
File "<pyshell#43>", line 1, in <module>
rfn.merge_arrays((getdat, out), flatten = True, usemask = False,
asrecarray=False)
File "C:\Python27\lib\site-packages\numpy\lib\recfunctions.py", line 458, in
merge_arrays
dtype=newdtype, count=maxlength)
ValueError: cannot create object arrays from iterator
The issue seems to be object field 'Tstamp' which contains python datetime
objects. I can merge structured arrays with numeric formats.
Any help much appreciated.
Alex van der Spek
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion