-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix sparse matrix interactions in sq.gr.utils
.
#891
Conversation
Made to be compatible with new `anndata` release.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #891 +/- ##
==========================================
- Coverage 69.99% 68.68% -1.32%
==========================================
Files 39 38 -1
Lines 5532 5572 +40
Branches 1037 1186 +149
==========================================
- Hits 3872 3827 -45
- Misses 1367 1448 +81
- Partials 293 297 +4
|
Also update dependencies to use compatible versions of newest `squidpy` and `anndata`. See `https://github.com/scverse/squidpy/pull/891`.
* Added simulation framework tests. * Add initialization test. * Update `README` to better reflect current dev workflow. Also make some formatting improvements. * Added multigroup test for spatial affinity groups. * Remove deprecated arguments in `load_anndata`. Also reformat `io.py`. * Add linter configurations to `pyproject.toml`. * Fix import name for `test_util.py`. * Add configuration for pre-commit. * Update test data. * Fix analysis tests. Fix analysis functions to match new tests. Fix code style. * Add tests for and refactor `simulation_framework.py`. * Finish `MultiReplicateSyntheticDataset` tests. Refactor accordingly. Add test data/expected outputs. * Fixes to `_canvas.py` and `simulation_framework.py`. * Add documentation for simulations. Fix intiialization tests. * Fix up binning test. Also update dependencies to use compatible versions of newest `squidpy` and `anndata`. See `https://github.com/scverse/squidpy/pull/891`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without testing this locally, seems reasonable
Please update the pin @alam-shahul
src/squidpy/gr/_utils.py
Outdated
CAN_USE_SPARSE_ARRAY = Version(anndata.__version__) >= Version("0.11.0") | ||
if not CAN_USE_SPARSE_ARRAY: | ||
from anndata._core.views import ArrayView | ||
from anndata._core.views import SparseCSCMatrixView as SparseCSCView | ||
from anndata._core.views import SparseCSRMatrixView as SparseCSRView | ||
else: | ||
from anndata._core.views import ArrayView, SparseCSCView, SparseCSRView |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a ping for @timtreis and @giovp that sparse array support is coming: https://docs.scipy.org/doc/scipy/reference/sparse.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the note
Remove high `anndata` pin.
…arse-matrix-fix
Sparse matrix fix
Hi, just wondering if the release/PyPI update will be made soon? |
Made to be compatible with new
anndata
release.IMPORTANT: Please search among the Pull requests before creating one.
Description
In
sq.gr.utils
, we change mentions ofSparseCSRView
andSparseCSCView
toSparseCSRMatrixView
andSparseCSCMatrixView
, respectively. We also updatepyproject.toml
to useanndata>=0.11.0rc1
. I suppose that the latter is still under development, but I feel it will soon be part of the main release.How has this been tested?
Unfortunately I ran into an error when trying to test this locally:
but this should be a drop-in fix...
Closes
This closes #890 .