MCPcopy
hub / github.com/pydata/xarray / test_interpolate_keep_attrs

Function test_interpolate_keep_attrs

xarray/tests/test_missing.py:264–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

262
263
264def test_interpolate_keep_attrs():
265 vals = np.array([1, 2, 3, 4, 5, 6], dtype=np.float64)
266 mvals = vals.copy()
267 mvals[2] = np.nan
268 missing = xr.DataArray(mvals, dims="x")
269 missing.attrs = {"test": "value"}
270
271 actual = missing.interpolate_na(dim="x", keep_attrs=True)
272 assert actual.attrs == {"test": "value"}
273
274
275def test_interpolate():

Callers

nothing calls this directly

Calls 2

interpolate_naMethod · 0.95
copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…