Skip to content

Commit

Permalink
Backport PR scverse#1100 on branch 0.9.x (Fix benchmarks and pandas c…
Browse files Browse the repository at this point in the history
…ompat) (scverse#1103)
  • Loading branch information
flying-sheep authored Aug 21, 2023
1 parent 5b3d23f commit f6d0ae7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions anndata/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ def test_views():
assert adata_subset.obs["foo"].tolist() == list(range(2))


def test_view_subset_shapes():
adata = gen_adata((20, 10), **GEN_ADATA_DASK_ARGS)

view = adata[:, ::2]
assert view.var.shape == (5, 8)
assert {k: v.shape[0] for k, v in view.varm.items()} == {k: 5 for k in view.varm}


def test_modify_view_component(matrix_type, mapping_name):
adata = ad.AnnData(
np.zeros((10, 10)),
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ classifiers = [
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
"pandas>=1.1.1,!=2.0.1", # pandas <1.1.1 has pandas/issues/35446
# pandas <1.1.1 has pandas/issues/35446
# pandas 2.1.0rc0 has pandas/issues/54622
"pandas >=1.1.1, !=2.1.0rc0",
"numpy>=1.16.5", # required by pandas 1.x
"scipy>1.4",
"h5py>=3",
Expand Down

0 comments on commit f6d0ae7

Please sign in to comment.