Cyforanumera
npm

API reference

Masked arrays (np.ma)

The np.ma module provides a MaskedArray class that wraps an NDArray with an optional boolean mask. Masked elements are excluded from arithmetic and reductions. np.ma.nomask is false; np.ma.masked is a masked-scalar sentinel.

NameSummary
np.maThe masked-array sub-module.

np.ma

#
np.ma

The masked-array sub-module. Exposes MaskedArray, constructors, mask utilities, and all ufuncs that propagate the mask.

Returns

object

Example

TypeScript
np.ma.nomask; // => false
np.ma.masked_array([1, 2, 3], { mask: [false, true, false] }).count(); // => 2