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

Method test_reindex_like_no_index

xarray/tests/test_dataarray.py:1840–1846  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1838 assert_identical(bar.reindex_like(foo), expected)
1839
1840 def test_reindex_like_no_index(self) -> None:
1841 foo = DataArray(np.random.randn(5, 6), dims=["x", "y"])
1842 assert_identical(foo, foo.reindex_like(foo))
1843
1844 bar = foo[:4]
1845 with pytest.raises(ValueError, match=r"different size for unlabeled"):
1846 foo.reindex_like(bar)
1847
1848 def test_reindex_regressions(self) -> None:
1849 da = DataArray(np.random.randn(5), coords=[("time", range(5))])

Callers

nothing calls this directly

Calls 3

reindex_likeMethod · 0.95
DataArrayClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected