SciPy sparse array migration from sparse matrices
As per the SciPy sparray migration guide this is a "pass 1" set of changes.
"Pass 1" essentially makes sure your code is compatible for both sparray and spmatrix. It doesn't actually change any sparse objects to sparray. It only changes usage of * and ** and gets rid of some functions like spdiags.
In this repo, we only need to change one use of ** for matrix power. Once scipy v1.12 is the minimal version we can use scipy.sparse.linalg.matrix_power for matrix power. But this PR uses @ repeatedly instead. It is close to the same speed for large matrices.
This change should also help if/when the code gets moved from using w to graph.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 98.2%. Comparing base (4037c70) to head (02f8d2c).
:warning: Report is 118 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #700 +/- ##
=======================================
+ Coverage 97.4% 98.2% +0.8%
=======================================
Files 26 40 +14
Lines 4328 7166 +2838
=======================================
+ Hits 4214 7034 +2820
- Misses 114 132 +18
| Files with missing lines | Coverage Δ | |
|---|---|---|
| momepy/weights.py | 98.5% <100.0%> (-1.5%) |
:arrow_down: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Thanks. Though the whole function has been deprecated and is marked for a removal in the upcoming release. So while I'm happy to merge this, it will be gone anyway :).
The weights module is gone now.