MCPcopy Index your code
hub / github.com/pydata/xarray / test_fillna_extension_array

Method test_fillna_extension_array

xarray/tests/test_dataarray.py:1970–1975  ·  view source on GitHub ↗
(self, fill_value, extension_array)

Source from the content-addressed store, hash-verified

1968 ),
1969 )
1970 def test_fillna_extension_array(self, fill_value, extension_array) -> None:
1971 srs: pd.Series = pd.Series(index=np.array([1, 2, 3]), data=extension_array)
1972 da = srs.to_xarray()
1973 filled = da.fillna(fill_value)
1974 assert filled.dtype == srs.dtype
1975 assert (filled.values == np.array([fill_value, *(srs.values[1:])])).all()
1976
1977 @requires_pyarrow
1978 def test_fillna_extension_array_bad_val(self) -> None:

Callers

nothing calls this directly

Calls 2

fillnaMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected