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

Method test_sel_boolean

xarray/tests/test_indexes.py:233–241  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

231 index.sel({"x": {"one": 0}})
232
233 def test_sel_boolean(self) -> None:
234 # index should be ignored and indexer dtype should not be coerced
235 # see https://github.com/pydata/xarray/issues/5727
236 index = PandasIndex(pd.Index([0.0, 2.0, 1.0, 3.0]), "x")
237 actual = index.sel({"x": [False, True, False, True]})
238 expected_dim_indexers = {"x": [False, True, False, True]}
239 np.testing.assert_array_equal(
240 actual.dim_indexers["x"], expected_dim_indexers["x"]
241 )
242
243 def test_sel_datetime(self) -> None:
244 index = PandasIndex(

Callers

nothing calls this directly

Calls 2

selMethod · 0.95
PandasIndexClass · 0.90

Tested by

no test coverage detected