Loosen AbstractArray restrictions where these are not necessary#63
Merged
Loosen AbstractArray restrictions where these are not necessary#63
AbstractArray restrictions where these are not necessary#63Conversation
Member
|
Looks good. I am interested in what Copilot has to say, so I will ask it for a review 😄 |
There was a problem hiding this comment.
Pull Request Overview
This PR loosens AbstractMatrix type restrictions in function signatures where they are not necessary, allowing for more flexible input types while maintaining functionality. The changes also refactor the truncation API from truncate! to truncate and update references accordingly.
- Remove unnecessary
AbstractMatrixtype constraints from function parameters - Refactor
truncate!totruncatewith updated return values and deprecation warning - Update function calls and documentation to use the new
truncateAPI
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/interface/svd.jl | Remove AbstractMatrix constraints from svd! and svd functions |
| src/interface/schur.jl | Remove AbstractMatrix constraints from schur! and schur functions |
| src/interface/polar.jl | Remove AbstractMatrix constraints from polar! and polar functions |
| src/interface/orthnull.jl | Remove AbstractMatrix constraints from orthogonalization functions |
| src/interface/eigh.jl | Remove AbstractMatrix constraints from eigh! and eigh functions |
| src/implementations/truncation.jl | Refactor truncate! to truncate with tuple return values |
| src/implementations/svd.jl | Update function signatures and truncate calls |
| src/implementations/schur.jl | Remove AbstractMatrix constraints from copy_input functions |
| src/implementations/qr.jl | Simplify copy_input functions and remove loop-based definitions |
| src/implementations/orthnull.jl | Update truncate function calls |
| src/implementations/lq.jl | Simplify copy_input functions and remove loop-based definitions |
| src/implementations/gen_eig.jl | Simplify copy_input function signature |
| src/implementations/eigh.jl | Update function signatures and truncate calls |
| src/implementations/eig.jl | Update function signatures and truncate calls |
| src/algorithms.jl | Add truncate documentation and deprecate truncate! |
| src/MatrixAlgebraKit.jl | Export truncate function |
| ext/MatrixAlgebraKitChainRulesCoreExt.jl | Update ChainRules integration for new signatures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Jutho
approved these changes
Oct 1, 2025
02a5e8d to
762227b
Compare
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.
Requires #60