dask 2021.10.0

ParametersReturns
set_fill_value(a, fill_value)

This docstring was copied from numpy.ma.set_fill_value.

Some inconsistencies with the Dask version may exist.

This function changes the fill value of the masked array a in place. If a is not a masked array, the function returns silently, without doing anything.

Parameters

a : array_like

Input array.

fill_value : dtype

Filling value. A consistency test is performed to make sure the value is compatible with the dtype of a.

Returns

None

Nothing returned by this function.

Set the filling value of a, if a is a masked array.

See Also

MaskedArray.fill_value

Return current fill value.

MaskedArray.set_fill_value

Equivalent method.

maximum_fill_value

Return the default fill value for a dtype.

Examples

This example is valid syntax, but we were not able to check execution
>>> import numpy.ma as ma  # doctest: +SKIP
... a = np.arange(5) # doctest: +SKIP
... a # doctest: +SKIP array([0, 1, 2, 3, 4])
This example is valid syntax, but we were not able to check execution
>>> a = ma.masked_where(a < 3, a)  # doctest: +SKIP
... a # doctest: +SKIP masked_array(data=[--, --, --, 3, 4], mask=[ True, True, True, False, False], fill_value=999999)
This example is valid syntax, but we were not able to check execution
>>> ma.set_fill_value(a, -999)  # doctest: +SKIP
... a # doctest: +SKIP masked_array(data=[--, --, --, 3, 4], mask=[ True, True, True, False, False], fill_value=-999)

Nothing happens if a is not a masked array.

This example is valid syntax, but we were not able to check execution
>>> a = list(range(5))  # doctest: +SKIP
... a # doctest: +SKIP [0, 1, 2, 3, 4]
This example is valid syntax, but we were not able to check execution
>>> ma.set_fill_value(a, 100)  # doctest: +SKIP
... a # doctest: +SKIP [0, 1, 2, 3, 4]
This example is valid syntax, but we were not able to check execution
>>> a = np.arange(5)  # doctest: +SKIP
... a # doctest: +SKIP array([0, 1, 2, 3, 4])
This example is valid syntax, but we were not able to check execution
>>> ma.set_fill_value(a, 100)  # doctest: +SKIP
... a # doctest: +SKIP array([0, 1, 2, 3, 4])
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/ma.py#159
type: <class 'function'>
Commit: