dtype, np.rec.fromarrays (aka np.core.records.fromarrays) dtype . ,
In [4]: a = np.core.records.fromarrays( ([1,2], ["one","two"]) )
In [5]: a
Out[5]:
rec.array([(1, 'one'), (2, 'two')],
dtype=[('f0', '<i4'), ('f1', '|S3')])
, dtype f1 3- .
np.concatenate( (a,b) ), numpy , dtpes a b dtype , .
, , dtype :
In [9]: a = np.rec.fromarrays( ([1,2], ["one","two"]), dtype = [('f0', '<i4'), ('f1', '|S8')])
In [10]: b = np.core.records.fromarrays( ([3,4,5], ["three","four","three"]), dtype = [('f0', '<i4'), ('f1', '|S8')])
:
In [11]: np.concatenate( (a,b))
Out[11]:
array([(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four'), (5, 'three')],
dtype=[('f0', '<i4'), ('f1', '|S8')])
, dtype "":
In [35]: a = np.core.records.fromarrays( ([1,2], ["one","two"]), dtype = [('f0', '<i4'), ('f1', 'object')])
In [36]: b = np.core.records.fromarrays( ([3,4,5], ["three","four","three"]), dtype = [('f0', '<i4'), ('f1', 'object')])
In [37]: np.concatenate( (a,b))
Out[37]:
array([(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four'), (5, 'three')],
dtype=[('f0', '<i4'), ('f1', '|O4')])
, dtype '|Sn' ( n), , , concatenate.