Skip to content

Commit

Permalink
(chore): add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ilan-gold committed Feb 12, 2024
1 parent 06fb6c0 commit b94865a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion anndata/tests/test_backed_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from pathlib import Path

from numpy.typing import ArrayLike
from pytest_mock import MockerFixture

subset_func2 = subset_func

Expand Down Expand Up @@ -167,11 +168,24 @@ def make_one_elem_mask(size: int) -> np.ndarray:
ids=["randomized", "alternating_10", "alternating_5", "one_group", "one_elem"],
)
def test_consecutive_bool(
mocker,
mocker: MockerFixture,
ondisk_equivalent_adata: tuple[AnnData, AnnData, AnnData, AnnData],
make_bool_mask: Callable[[int], np.ndarray],
should_trigger_optimization: bool | None,
):
"""Tests for optimization from https://github.com/scverse/anndata/pull/1233
Parameters
----------
mocker
Mocker object
ondisk_equivalent_adata
AnnData objects with sparse X for testing
make_bool_mask
Function for creating a boolean mask.
should_trigger_optimization
Whether or not a given mask should trigger the optimized behavior.
"""
_, csr_disk, csc_disk, _ = ondisk_equivalent_adata
mask = make_bool_mask(csr_disk.shape[0])

Expand Down

0 comments on commit b94865a

Please sign in to comment.