numpy.ma.default_fill_value(obj)
[source]
Return the default fill value for the argument object.
The default filling value depends on the datatype of the input array or the type of the input scalar:
datatype | default |
---|---|
bool | True |
int | 999999 |
float | 1.e20 |
complex | 1.e20+0j |
object | ‘?’ |
string | ‘N/A’ |
For structured types, a structured scalar is returned, with each field the default fill value for its type.
For subarray types, the fill value is an array of the same size containing the default scalar fill value.
Parameters: |
|
---|---|
Returns: |
|
>>> np.ma.default_fill_value(1) 999999 >>> np.ma.default_fill_value(np.array([1.1, 2., np.pi])) 1e+20 >>> np.ma.default_fill_value(np.dtype(complex)) (1e+20+0j)
© 2005–2019 NumPy Developers
Licensed under the 3-clause BSD License.
https://docs.scipy.org/doc/numpy-1.17.0/reference/generated/numpy.ma.default_fill_value.html