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

Support for scipy 1.14 #646

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Support for scipy 1.14 #646

merged 1 commit into from
Aug 22, 2024

Conversation

andr-kun
Copy link
Contributor

PR Checklist

  • Referenced issue is linked
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

The new scipy version (1.14+) deprecate the use of .A to access the array value of sparse matrices, which breaks some functions within pertpy. This PR fixes the issue by using the toarray() function to access the array value of sparse matrices.

Technical details

The PR fix works on both the new scipy version (1.14+) and older scipy version (1.13.1) as well. However, I was only able to test the guide RNA and milo functions, not the discriminator classifier function.

@Zethson Zethson requested a review from Lilly-May August 22, 2024 17:58
Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear @andr-kun

thank you! I'm surprised that we haven't run into that in our CI yet. Maybe one of our dependencies bounded scipy?

@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 66.99%. Comparing base (c4233dd) to head (a9aac89).
Report is 1 commits behind head on main.

Files Patch % Lines
pertpy/preprocessing/_guide_rna.py 0.00% 4 Missing ⚠️
pertpy/tools/_milo.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #646      +/-   ##
==========================================
+ Coverage   64.43%   66.99%   +2.55%     
==========================================
  Files          46       46              
  Lines        5942     5942              
==========================================
+ Hits         3829     3981     +152     
+ Misses       2113     1961     -152     
Files Coverage Δ
.../_perturbation_space/_discriminator_classifiers.py 89.26% <100.00%> (ø)
pertpy/tools/_milo.py 61.03% <0.00%> (ø)
pertpy/preprocessing/_guide_rna.py 50.00% <0.00%> (ø)

... and 4 files with indirect coverage changes

@Zethson Zethson merged commit 7a83a8b into scverse:main Aug 22, 2024
7 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.

3 participants