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

Method test_sel_float

xarray/tests/test_dataarray.py:1181–1191  ·  view source on GitHub ↗
(self, coord_values, indices)

Source from the content-addressed store, hash-verified

1179 ),
1180 )
1181 def test_sel_float(self, coord_values, indices) -> None:
1182 data_values = np.arange(4)
1183
1184 arr = DataArray(data_values, coords={"x": coord_values}, dims="x")
1185
1186 actual = arr.sel(x=coord_values[indices])
1187 expected = DataArray(
1188 data_values[indices], coords={"x": coord_values[indices]}, dims="x"
1189 )
1190
1191 assert_equal(actual, expected)
1192
1193 def test_sel_float16(self) -> None:
1194 data_values = np.arange(4)

Callers

nothing calls this directly

Calls 4

selMethod · 0.95
DataArrayClass · 0.90
assert_equalFunction · 0.90
arangeMethod · 0.80

Tested by

no test coverage detected