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

Function test_indexing_1d_object_array

xarray/tests/test_indexing.py:1093–1103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1091
1092
1093def test_indexing_1d_object_array() -> None:
1094 items = (np.arange(3), np.arange(6))
1095 arr = DataArray(np.array(items, dtype=object))
1096
1097 actual = arr[0]
1098
1099 expected_data = np.empty((), dtype=object)
1100 expected_data[()] = items[0]
1101 expected = DataArray(expected_data)
1102
1103 assert [actual.data.item()] == [expected.data.item()]
1104
1105
1106@requires_dask

Callers

nothing calls this directly

Calls 3

DataArrayClass · 0.90
arangeMethod · 0.80
emptyMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…