Skip to content

Commit

Permalink
Remove test_concat_size_0_dim workaround (#1005)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Jun 13, 2023
1 parent 5bc8bc8 commit fa1c06c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ __pycache__/
/dist/
/*.egg-info/
/requirements*.lock
/.python-version

# Tests and coverage
/.pytest_cache/
Expand Down
17 changes: 0 additions & 17 deletions anndata/tests/test_concatenate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,23 +1284,6 @@ def test_concat_size_0_dim(axis, join_type, merge_strategy, shape):
alt_axis = 1 - axis
dim = ("obs", "var")[axis]

# TODO: Remove, see: https://github.com/scverse/anndata/issues/905
import awkward as ak

if (
(join_type == "inner")
and (merge_strategy in ("same", "unique"))
and ((axis, shape.index(0)) in [(0, 1), (1, 0)])
and ak.__version__ == "2.0.7" # indicates if a release has happened
):
aligned_mapping = (b.obsm, b.varm)[1 - axis]
to_remove = []
for k, v in aligned_mapping.items():
if isinstance(v, ak.Array):
to_remove.append(k)
for k in to_remove:
aligned_mapping.pop(k)

expected_size = expected_shape(a, b, axis=axis, join=join_type)
result = concat(
{"a": a, "b": b},
Expand Down

0 comments on commit fa1c06c

Please sign in to comment.