Skip to content

Loosen AbstractArray restrictions where these are not necessary#63

Merged
lkdvos merged 2 commits intomainfrom
ld-abstractarray
Oct 1, 2025
Merged

Loosen AbstractArray restrictions where these are not necessary#63
lkdvos merged 2 commits intomainfrom
ld-abstractarray

Conversation

@lkdvos
Copy link
Copy Markdown
Member

@lkdvos lkdvos commented Oct 1, 2025

Requires #60

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 78.46154% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/interface/orthnull.jl 0.00% 4 Missing ⚠️
src/interface/eigh.jl 0.00% 2 Missing ⚠️
src/interface/polar.jl 0.00% 2 Missing ⚠️
src/interface/schur.jl 0.00% 2 Missing ⚠️
src/interface/svd.jl 0.00% 2 Missing ⚠️
src/implementations/eig.jl 80.00% 1 Missing ⚠️
src/implementations/truncation.jl 90.90% 1 Missing ⚠️
Files with missing lines Coverage Δ
ext/MatrixAlgebraKitChainRulesCoreExt.jl 83.73% <100.00%> (ø)
src/MatrixAlgebraKit.jl 100.00% <ø> (ø)
src/algorithms.jl 92.80% <ø> (ø)
src/implementations/eigh.jl 94.44% <100.00%> (-0.05%) ⬇️
src/implementations/gen_eig.jl 100.00% <100.00%> (ø)
src/implementations/lq.jl 98.93% <100.00%> (+<0.01%) ⬆️
src/implementations/orthnull.jl 90.90% <100.00%> (ø)
src/implementations/qr.jl 96.61% <100.00%> (+0.01%) ⬆️
src/implementations/schur.jl 100.00% <100.00%> (ø)
src/implementations/svd.jl 92.25% <100.00%> (-0.03%) ⬇️
... and 7 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jutho
Copy link
Copy Markdown
Member

Jutho commented Oct 1, 2025

Looks good. I am interested in what Copilot has to say, so I will ask it for a review 😄

@Jutho Jutho requested a review from Copilot October 1, 2025 09:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AbstractMatrix type constraints from function parameters
  • Refactor truncate! to truncate with updated return values and deprecation warning
  • Update function calls and documentation to use the new truncate API

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.

Comment thread src/implementations/qr.jl
Comment thread src/implementations/lq.jl
@lkdvos lkdvos merged commit 948fbb4 into main Oct 1, 2025
7 of 9 checks passed
@lkdvos lkdvos deleted the ld-abstractarray branch October 1, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants