fromarrays(arrayList, dtype=None, shape=None, formats=None, names=None, titles=None, aligned=False, byteorder=None)
List of array-like objects (such as lists, tuples, and ndarrays).
valid dtype for all arrays
Shape of the resulting array. If not provided, inferred from arrayList[0]
.
If dtype
is None
, these arguments are passed to numpy.format_parser
to construct a dtype. See that function for detailed documentation.
Record array consisting of given arrayList columns.
Create a record array from a (flat) list of arrays
>>> 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) # may vary
>>> x1[1]=34
... r.a array([1, 2, 3, 4])
>>> x1 = np.array([1, 2, 3, 4])See :
... x2 = np.array(['a', 'dd', 'xyz', '12'])
... x3 = np.array([1.1, 2, 3,4])
... r = np.core.records.fromarrays(
... [x1, x2, x3],
... dtype=np.dtype([('a', np.int32), ('b', 'S3'), ('c', np.float32)]))
... r rec.array([(1, b'a', 1.1), (2, b'dd', 2. ), (3, b'xyz', 3. ), (4, b'12', 4. )], dtype=[('a', '<i4'), ('b', 'S3'), ('c', '<f4')])
The following pages refer to to this document either explicitly or contain code examples using this.
numpy.rec.array
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them