numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturns
compress_nd(x, axis=None)

Parameters

x : array_like, MaskedArray

The array to operate on. If not a MaskedArray instance (or if no array elements are masked), x is interpreted as a MaskedArray with :None:None:`mask` set to :None:None:`nomask`.

axis : tuple of ints or int, optional

Which dimensions to suppress slices from can be configured with this parameter. - If axis is a tuple of ints, those are the axes to suppress slices from. - If axis is an int, then that is the only axis to suppress slices from. - If axis is None, all axis are selected.

Returns

compress_array : ndarray

The compressed array.

Suppress slices from multiple dimensions which contain masked values.

Examples

See :

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#800
type: <class 'function'>
Commit: