def test_backend_indexing_non_numpy() -> None:
    """This model indexing of a Zarr store that reads to GPU memory."""
    array = DuckArrayWrapper(np.array([1, 2, 3]))
    indexed = indexing.explicit_indexing_adapter(
        indexing.BasicIndexer((slice(1),)),
        shape=array.shape,
        indexing_support=indexing.IndexingSupport.BASIC,
        raw_indexing_method=array.__getitem__,
    )
    np.testing.assert_array_equal(indexed.array, np.array([1]))
This model indexing of a Zarr store that reads to GPU memory.
xarray/tests/test_indexing.py