dask 2021.10.0

NotesParametersReturns
fix_invalid(a, fill_value=None)

This docstring was copied from numpy.ma.fix_invalid.

Some inconsistencies with the Dask version may exist.

Invalid data means values of :None:None:`nan`, :None:None:`inf`, etc.

Notes

A copy is performed by default.

Parameters

a : array_like

Input array, a (subclass of) ndarray.

mask : sequence, optional (Not supported in Dask)

Mask. Must be convertible to an array of booleans with the same shape as :None:None:`data`. True indicates a masked (i.e. invalid) data.

copy : bool, optional (Not supported in Dask)

Whether to use a copy of a (True) or to fix a in place (False). Default is True.

fill_value : scalar, optional

Value used for fixing invalid data. Default is None, in which case the a.fill_value is used.

Returns

b : MaskedArray

The input array with invalid entries fixed.

Return input with invalid data masked and replaced by a fill value.

Examples

This example is valid syntax, but we were not able to check execution
>>> x = np.ma.array([1., -1, np.nan, np.inf], mask=[1] + [0]*3)  # doctest: +SKIP
... x # doctest: +SKIP masked_array(data=[--, -1.0, nan, inf], mask=[ True, False, False, False], fill_value=1e+20)
This example is valid syntax, but we were not able to check execution
>>> np.ma.fix_invalid(x)  # doctest: +SKIP
masked_array(data=[--, -1.0, --, --],
             mask=[ True, False,  True,  True],
       fill_value=1e+20)
This example is valid syntax, but we were not able to check execution
>>> fixed = np.ma.fix_invalid(x)  # doctest: +SKIP
... fixed.data # doctest: +SKIP array([ 1.e+00, -1.e+00, 1.e+20, 1.e+20])
This example is valid syntax, but we were not able to check execution
>>> x.data  # doctest: +SKIP
array([ 1., -1., nan, inf])
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#98
type: <class 'function'>
Commit: