diff --git a/src/anndata/compat/__init__.py b/src/anndata/compat/__init__.py index 255ffa548..55e1c2695 100644 --- a/src/anndata/compat/__init__.py +++ b/src/anndata/compat/__init__.py @@ -47,7 +47,7 @@ class Empty: pass -Index1D = slice | int | str | np.int64 | np.ndarray +Index1D = slice | int | str | np.int64 | np.ndarray | pd.Series[bool] IndexRest = Index1D | EllipsisType Index = ( IndexRest diff --git a/tests/test_concatenate.py b/tests/test_concatenate.py index 1cc3e8b3f..3dd5a361e 100644 --- a/tests/test_concatenate.py +++ b/tests/test_concatenate.py @@ -1444,7 +1444,7 @@ def test_concat_outer_aligned_mapping(elem): del b.obsm[elem] concated = concat({"a": a, "b": b}, join="outer", label="group") - result = concated.obsm[elem][(concated.obs["group"] == "b").to_numpy()] + result = concated[concated.obs["group"] == "b"].obsm[elem] check_filled_like(result, elem_name=f"obsm/{elem}")