xarray.IndexVariable.isnull

IndexVariable.isnull(keep_attrs=None)

Test each value in the array for whether it is a missing value.

Returns

isnull – Same type and shape as object, but the dtype of the data is bool.

Return type

Variable

See also

pandas.isnull

Examples

>>> var = xr.Variable("x", [1, np.nan, 3])
>>> var
<xarray.Variable (x: 3)>
array([ 1., nan,  3.])
>>> var.isnull()
<xarray.Variable (x: 3)>
array([False,  True, False])