bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / ma / core / make_mask_none
function
numpy.ma.core:make_mask_none
source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :1687
Signature
def make_mask_none ( newshape , dtype = None ) Summary
Return a boolean mask of the given shape, filled with False.
Extended Summary
This function returns a boolean ndarray with all entries False, that can be used in common mask manipulations. If a complex dtype is specified, the type of each field is converted to a boolean type.
Parameters
newshape: tupleA tuple indicating the shape of the mask.
dtype: {None, dtype}, optionalIf None, use a MaskType instance. Otherwise, use a new datatype with the same fields as
dtype, converted to boolean types.
Returns
result: ndarrayAn ndarray of appropriate shape and dtype, filled with False.
Examples
import numpy as np import numpy.ma as ma ma.make_mask_none((3,))Defining a more complex dtype.
dtype = np.dtype({'names':['foo', 'bar'], 'formats':[np.float32, np.int64]}) dtype ma.make_mask_none((3,), dtype=dtype)
See also
- make_mask
Create a boolean mask from an array.
- make_mask_descr
Construct a dtype description list from a given dtype.
Aliases
-
numpy.ma.make_mask_none