diff --git a/src/anndata/compat/__init__.py b/src/anndata/compat/__init__.py index 052f2e24b..b5ec3d415 100644 --- a/src/anndata/compat/__init__.py +++ b/src/anndata/compat/__init__.py @@ -55,6 +55,7 @@ class Empty: | tuple[IndexRest, Index1D] | tuple[Index1D, Index1D, EllipsisType] | tuple[EllipsisType, Index1D, Index1D] + | tuple[Index1D, EllipsisType, Index1D] | scipy.sparse.spmatrix | SpArray ) diff --git a/tests/test_backed_sparse.py b/tests/test_backed_sparse.py index c571f2ee6..0050c5111 100644 --- a/tests/test_backed_sparse.py +++ b/tests/test_backed_sparse.py @@ -130,10 +130,11 @@ def test_backed_indexing( @pytest.mark.parametrize( "indexing_func", [ - lambda x: (Ellipsis, slice(0, 10)), - lambda x: (slice(0, 10), Ellipsis), - lambda x: (slice(0, 10), slice(0, 10), Ellipsis), - lambda x: (Ellipsis, slice(0, 10), slice(0, 10)), + (..., slice(0, 10)), + (slice(0, 10), ...), + (slice(0, 10), slice(0, 10), ...), + (..., slice(0, 10), slice(0, 10)), + (slice(0, 10), ..., slice(0, 10)), ], ids=["obs-ellipsis", "var-ellipsis", "obs-var-ellipsis", "ellipsis-obs-var"], )