toflex(self)
The flexible type array that is returned will have two fields:
the _data
field stores the _data
part of the array.
the _mask
field stores the _mask
part of the array.
A side-effect of transforming a masked array into a flexible ndarray
is that meta information ( fill_value
, ...) will be lost.
A new flexible-type ndarray
with two fields: the first element containing a value, the second element containing the corresponding mask boolean. The returned record shape matches self.shape.
Transforms a masked array into a flexible-type array.
>>> x = np.ma.array([[1,2,3],[4,5,6],[7,8,9]], mask=[0] + [1,0]*4)This example is valid syntax, but we were not able to check execution
... x masked_array( data=[[1, --, 3], [--, 5, --], [7, --, 9]], mask=[[False, True, False], [ True, False, True], [False, True, False]], fill_value=999999)
>>> x.toflex() array([[(1, False), (2, True), (3, False)], [(4, True), (5, False), (6, True)], [(7, False), (8, True), (9, False)]], dtype=[('_data', '<i8'), ('_mask', '?')])See :
The following pages refer to to this document either explicitly or contain code examples using this.
numpy.ma.core.fromflex
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