combining recarrays
31 Dec
2008
31 Dec
'08
2:10 a.m.
Hi!
I'm a bit stumped by the following: suppose I have several recarrays
with identical dtypes (identical field names, etc.) and would like to
combine them into one rec array, what would be the best way to do
that? I tried using np.rec.fromrecords, but that doesn't produce the
desired result. As a minimal example consider the following code:
desc = np.dtype({'names':['a','b'],'formats':[np.float,np.int]})
rec1 = np.zeros(3,desc)
rec2 = np.zeros(3,desc)
Now I have two recarrays of shape (3,) that both look like this:
array([(0.0, 0), (0.0, 0), (0.0, 0)],
dtype=[('a', '
5589
Age (days ago)
5589
Last active (days ago)
1 comments
2 participants
participants (2)
-
ctw
-
Keith Goodman