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

Function test_tree_index_init_errors

xarray/tests/test_nd_point_index.py:38–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37@requires_scipy
38def test_tree_index_init_errors() -> None:
39 xx, yy = np.meshgrid([1.0, 2.0], [3.0, 4.0])
40 ds = xr.Dataset(coords={"xx": (("y", "x"), xx), "yy": (("y", "x"), yy)})
41
42 ds2 = ds.assign_coords(yy=(("u", "v"), [[3.0, 3.0], [4.0, 4.0]]))
43
44 with pytest.raises(ValueError, match="same dimensions"):
45 ds2.set_xindex(("xx", "yy"), NDPointIndex)
46
47
48@requires_scipy

Callers

nothing calls this directly

Calls 2

assign_coordsMethod · 0.45
set_xindexMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…