numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
masked_all(shape, dtype=<class 'float'>)

Return an empty masked array of the given shape and dtype, where all the data are masked.

Parameters

shape : tuple

Shape of the required MaskedArray.

dtype : dtype, optional

Data type of the output.

Returns

a : MaskedArray

A masked array with all data masked.

Empty masked array with all elements masked.

See Also

masked_all_like

Empty masked array modelled on an existing array.

Examples

>>> import numpy.ma as ma
... ma.masked_all((3, 3)) masked_array( data=[[--, --, --], [--, --, --], [--, --, --]], mask=[[ True, True, True], [ True, True, True], [ True, True, True]], fill_value=1e+20, dtype=float64)

The dtype parameter defines the underlying data type.

>>> a = ma.masked_all((3, 3))
... a.dtype dtype('float64')
>>> a = ma.masked_all((3, 3), dtype=np.int32)
... a.dtype dtype('int32')
See :

Back References

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

numpy.ma.extras.masked_all_like

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