mask_rowcols(a, axis=None)
Mask whole rows and/or columns of a 2D array that contain masked values. The masking behavior is selected using the :None:None:`axis`
parameter.
If
:None:None:`axis`
is None, rows and columns are masked.If
:None:None:`axis`
is 0, only rows are masked.If
:None:None:`axis`
is 1 or -1, only columns are masked.
The input array's mask is modified by this function.
The array to mask. If not a MaskedArray instance (or if no array elements are masked). The result is a MaskedArray with :None:None:`mask`
set to :None:None:`nomask`
(False). Must be a 2D array.
Axis along which to perform the operation. If None, applies to a flattened version of the array.
If input array a
is not 2D.
A modified version of the input array, masked depending on the value of the :None:None:`axis`
parameter.
Mask rows and/or columns of a 2D array that contain masked values.
mask_cols
Mask cols of a 2D array that contain masked values.
mask_rows
Mask rows of a 2D array that contain masked values.
masked_where
Mask where a condition is met.
>>> import numpy.ma as maThis example is valid syntax, but we were not able to check execution
... a = np.zeros((3, 3), dtype=int)
... a[1, 1] = 1
... a array([[0, 0, 0], [0, 1, 0], [0, 0, 0]])
>>> a = ma.masked_equal(a, 1)This example is valid syntax, but we were not able to check execution
... a masked_array( data=[[0, 0, 0], [0, --, 0], [0, 0, 0]], mask=[[False, False, False], [False, True, False], [False, False, False]], fill_value=1)
>>> ma.mask_rowcols(a) masked_array( data=[[0, --, 0], [--, --, --], [0, --, 0]], mask=[[False, True, False], [ True, True, True], [False, True, False]], fill_value=1)See :
The following pages refer to to this document either explicitly or contain code examples using this.
numpy.ma.extras.mask_rows
numpy.ma.extras.mask_cols
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