Numpy 2 compat, scipy sparse arrays, and python version floor bump#160
Open
NDevanathan wants to merge 2 commits into
Open
Numpy 2 compat, scipy sparse arrays, and python version floor bump#160NDevanathan wants to merge 2 commits into
NDevanathan wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request updates the package to support
numpy>=2.0.0and the newscipy.sparse.csr_arrayandcsc_arraytypes in addition to the traditionalcsr_matrixandcsc_matrixtypes. It also updates the package version to2.0.0.dev, since there's consequently some minor changes in the interface (output types and property types) and the dep floor was raised.#152 #148
Support for scipy.sparse array types:
csr_arrayandcsc_arraythroughout the codebase, including type annotations, runtime checks, and documentation inadelie/constraint.py,adelie/diagnostic.py, andadelie/matrix.py. This allows users to pass either the new array-based or the classic matrix-based sparse types.API and documentation consistency:
Versioning and maintenance:
2.0.0.devinadelie/__init__.pyto signal a breaking or significant change in the API.Array handling improvements:
copyparameter for array construction, usingcopy=copy or Noneto avoid unnecessary copies and potential issues.Minor fixes:
README.mdto point to the correct location in the documentation.np.asarrayinstead ofnp.arraywhere appropriate for better handling of input types.These changes ensure that the package remains compatible with the latest versions of SciPy and continues to provide a consistent and user-friendly API for both classic and new sparse matrix types.