numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
tolist(self, fill_value=None)

Data items are converted to the nearest compatible Python type. Masked values are converted to fill_value . If fill_value is None, the corresponding entries in the output list will be None .

Parameters

fill_value : scalar, optional

The value to use for invalid entries. Default is None.

Returns

result : list

The Python list representation of the masked array.

Return the data portion of the masked array as a hierarchical Python list.

Examples

This example is valid syntax, but we were not able to check execution
>>> x = np.ma.array([[1,2,3], [4,5,6], [7,8,9]], mask=[0] + [1,0]*4)
... x.tolist() [[1, None, 3], [None, 5, None], [7, None, 9]]
This example is valid syntax, but we were not able to check execution
>>> x.tolist(-999)
[[1, -999, 3], [-999, 5, -999], [7, -999, 9]]
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.ma.core.MaskedArray.tobytes

Local connectivity graph

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


GitHub : /numpy/ma/core.py#6000
type: <class 'function'>
Commit: