Return the maximum value that can be represented by the dtype of an object.
This function is useful for calculating a fill value suitable for taking the minimum of an array with a given dtype.
An object that can be queried for it’s numeric type.
The maximum representable value.
If obj isn’t a suitable numeric type.
See also
maximum_fill_valueThe inverse function.
set_fill_valueSet the filling value of a masked array.
MaskedArray.fill_valueReturn current fill value.
>>> import numpy as np >>> import numpy.ma as ma >>> a = np.int8() >>> ma.minimum_fill_value(a) 127 >>> a = np.int32() >>> ma.minimum_fill_value(a) 2147483647
An array of numeric data can also be passed.
>>> a = np.array([1, 2, 3], dtype=np.int8) >>> ma.minimum_fill_value(a) 127 >>> a = np.array([1, 2, 3], dtype=np.float32) >>> ma.minimum_fill_value(a) inf
© 2005–2024 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/2.4/reference/generated/numpy.ma.minimum_fill_value.html