Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PR #1100 on branch 0.9.x (Fix benchmarks and pandas compat) #1103

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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