numpy 1.22.4 Pypi GitHub Homepage
Other Docs
BackRef
mask_cols(a, axis=<no value>)

This function is a shortcut to mask_rowcols with :None:None:`axis` equal to 1.

Mask columns of a 2D array that contain masked values.

See Also

mask_rowcols

Mask rows and/or columns of a 2D array.

masked_where

Mask where a condition is met.

Examples

>>> import numpy.ma as ma
... 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)
... 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_cols(a)
masked_array(
  data=[[0, --, 0],
        [0, --, 0],
        [0, --, 0]],
  mask=[[False,  True, False],
        [False,  True, False],
        [False,  True, False]],
  fill_value=1)
See :

Back References

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

numpy.ma.core.mask_rowcols

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/extras.py#981
type: <class 'function'>
Commit: