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

Function test_coord_attrs

xarray/tests/test_interp.py:1041–1052  ·  view source on GitHub ↗
(
    x,
    expect_same_attrs: bool,
)

Source from the content-addressed store, hash-verified

1039 ],
1040)
1041def test_coord_attrs(
1042 x,
1043 expect_same_attrs: bool,
1044) -> None:
1045 base_attrs = dict(foo="bar")
1046 ds = xr.Dataset(
1047 data_vars=dict(a=2 * np.arange(5)),
1048 coords={"x": ("x", np.arange(5), base_attrs)},
1049 )
1050
1051 has_same_attrs = ds.interp(x=x).x.attrs == base_attrs
1052 assert expect_same_attrs == has_same_attrs
1053
1054
1055@requires_scipy

Callers

nothing calls this directly

Calls 2

interpMethod · 0.95
arangeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…