This is a pre-release version (2.5.0.dev0+git20251130.2de293a). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / ma / core / make_mask_descr

function

numpy.ma.core:make_mask_descr

source: build-install/usr/lib/python3.14/site-packages/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 : dtype

The dtype to convert.

Returns

result : dtype

A 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