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 / minimum_fill_value

function

numpy.ma.core:minimum_fill_value

source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :319

Signature

def   minimum_fill_value ( obj )

Summary

Return the maximum value that can be represented by the dtype of an object.

Extended Summary

This function is useful for calculating a fill value suitable for taking the minimum of an array with a given dtype.

Parameters

obj : ndarray, dtype or scalar

An object that can be queried for it's numeric type.

Returns

val : scalar

The maximum representable value.

Raises

: TypeError

If obj isn't a suitable numeric type.

Examples

import numpy as np
import numpy.ma as ma
a = np.int8()
ma.minimum_fill_value(a)
a = np.int32()
ma.minimum_fill_value(a)
An array of numeric data can also be passed.
a = np.array([1, 2, 3], dtype=np.int8)
ma.minimum_fill_value(a)
a = np.array([1, 2, 3], dtype=np.float32)
ma.minimum_fill_value(a)

See also

MaskedArray.fill_value

Return current fill value.

maximum_fill_value

The inverse function.

set_fill_value

Set the filling value of a masked array.

Aliases

  • numpy.ma.minimum_fill_value