bundles / numpy 2.4.4 / numpy / ma / core / make_mask_descr
function
numpy.ma.core:make_mask_descr
source: /numpy/ma/core.py :1366
Signature
def make_mask_descr ( ndtype ) Summary
Construct a dtype description list from a given dtype.
Extended Summary
Returns a new dtype object, with the type of all fields in ndtype to a boolean type. Field names are not altered.
Parameters
ndtype: dtypeThe dtype to convert.
Returns
result: dtypeA dtype that looks like
ndtype, the type of all fields is boolean.
Examples
import numpy as np import numpy.ma as ma dtype = np.dtype({'names':['foo', 'bar'], 'formats':[np.float32, np.int64]}) dtype ma.make_mask_descr(dtype) ma.make_mask_descr(np.float32)
Aliases
-
numpy.ma.make_mask_descr