Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Summary
This PR makes minimal changes to handle deprecations in nibabel 5 and networkx 3.
As seen in #3535, simply switching to sparse arrays breaks the dependency graph matrix representation. However, scipy sparse arrays are just sparse matrices with wrappers on top, so we can just get back to the matrix for now. While they claim they are deprecating the API, much of the API still works with and produces matrices, so I think we have time where we can continue doing what works.
In the long run, it would be nice to understand what is treating these representations differently, but that's beyond the time I have to devote to this. I would rather get things working before embarking on a refactor, especially if it's just a cheap type coercion.
Fixes #3537.
Fixes #3530.
Fixes #3539.
List of changes proposed in this PR (pull-request)
nx.to_scipy_sparse_matrix()
tossp.lil_matrix(nx.to_scipy_sparse_array())
"str"
instead of"string"