-
numpy.core.records.fromarrays(arrayList, dtype=None, shape=None, formats=None, names=None, titles=None, aligned=False, byteorder=None)
[source] -
create a record array from a (flat) list of arrays
123456789>>> x1
=
np.array([
1
,
2
,
3
,
4
])
>>> x2
=
np.array([
'a'
,
'dd'
,
'xyz'
,
'12'
])
>>> x3
=
np.array([
1.1
,
2
,
3
,
4
])
>>> r
=
np.core.records.fromarrays([x1,x2,x3],names
=
'a,b,c'
)
>>>
print
(r[
1
])
(
2
,
'dd'
,
2.0
)
>>> x1[
1
]
=
34
>>> r.a
array([
1
,
2
,
3
,
4
])
numpy.core.records.fromarrays()

2025-01-10 15:47:30
Please login to continue.