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

Method test_drop_vars_callable

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

Source from the content-addressed store, hash-verified

2953 assert_identical(actual, renamed)
2954
2955 def test_drop_vars_callable(self) -> None:
2956 A = DataArray(
2957 np.random.randn(2, 3), dims=["x", "y"], coords={"x": [1, 2], "y": [3, 4, 5]}
2958 )
2959 expected = A.drop_vars(["x", "y"])
2960 actual = A.drop_vars(lambda x: x.indexes)
2961 assert_identical(expected, actual)
2962
2963 def test_drop_multiindex_level(self) -> None:
2964 # GH6505

Callers

nothing calls this directly

Calls 3

drop_varsMethod · 0.95
DataArrayClass · 0.90
assert_identicalFunction · 0.90

Tested by

no test coverage detected