Skip to content

Conversation

MiquelSendra
Copy link
Contributor

I replaced all deprecated .A attribute calls on sparse matrices with a .toarray() fallback, through a little helper _to_dense() fucntion within the Embryo class. What it does:

  • Prevents AttributeError: 'csr_matrix' object has no attribute 'A' on SciPy ≥1.11.
  • Makes sure the compatibility with both sparse and dense AnnData matrices.
  • Introduces _to_dense() to simplify sparse-to-dense conversions.

I tested locally on AnnData objects with store_anndata=True using new and old Scanpy and SciPy versions. Gives no errors.

Summary of edits:

  • Added _to_dense() static method inside Embryo class (just at the begginig)
  • Updated all .X.A calls to self._to_dense(... .X).

Copy link

codecov bot commented Oct 9, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@leoguignard leoguignard merged commit 1da1bee into GuignardLab:main Oct 17, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants