Though this PR changes a lot of lines, they are limited to the following cases:
To convert a scipy.sparse.spmatrix to a dense array, use A.toarray() instead of A.A (the latter is deprecated)
The output from numpy.unique(..., return_inverse=True) can now be 2d. The code was updated to reflect this.
Use numpy.isin rather than the deprecated numpy.in1d.
Use numpy.nan instead of numpy.NaN (changed a single occurence)
Updated documentation of a single function in utils/setmembership.py. This is the only change that was not directly linked to the updates of numpy and scipy versions.
Notes:
The code should be compatible with both numpy 1.X and 2.X
While the test suite would benefit from black formatting, I did not do so in this PR, since this would have made it very difficult to get an overview of the changes. Instead I suggest to do this in a dedicated PR, and then probably require that the test folders are compatible with black as part of the static tests.
Types of changes
What types of changes does this PR introduce to PorePy?
Put an x in the boxes that apply.
[ ] Minor change (e.g., dependency bumps, broken links).
[ ] Bugfix (non-breaking change which fixes an issue).
[ ] New feature (non-breaking change which adds functionality).
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
[x] Testing (contribution related to testing of existing or new functionality).
[x] Documentation (contribution related to adding, improving, or fixing documentation).
[x] Maintenance (e.g., improve logic and performance, remove obsolete code).
[ ] Other:
Checklist
Put an x in the boxes that apply or explain briefly why the box is not relevant.
[x] The documentation is up-to-date.
[ ] Static typing is included in the update. NOT RELEVANT
[x] This PR does not duplicate existing functionality.
[x] The update is covered by the test suite (including tests added in the PR).
[x] If new skipped tests have been introduced in this PR, pytest was run with the --run-skipped flag.
Proposed changes
Though this PR changes a lot of lines, they are limited to the following cases:
scipy.sparse.spmatrix
to a dense array, useA.toarray()
instead ofA.A
(the latter is deprecated)numpy.unique(..., return_inverse=True)
can now be 2d. The code was updated to reflect this.numpy.isin
rather than the deprecatednumpy.in1d
.numpy.nan
instead ofnumpy.NaN
(changed a single occurence)utils/setmembership.py
. This is the only change that was not directly linked to the updates of numpy and scipy versions.Notes:
numpy 1.X
and2.X
black
formatting, I did not do so in this PR, since this would have made it very difficult to get an overview of the changes. Instead I suggest to do this in a dedicated PR, and then probably require that the test folders are compatible withblack
as part of the static tests.Types of changes
What types of changes does this PR introduce to PorePy? Put an
x
in the boxes that apply.Checklist
Put an
x
in the boxes that apply or explain briefly why the box is not relevant.pytest
was run with the--run-skipped
flag.