Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement reverse for more Matrix variants #54231

Open
wants to merge 59 commits into
base: master
Choose a base branch
from

Conversation

Sahiti004
Copy link

@Sahiti004 Sahiti004 commented Apr 24, 2024

This pull request resolves #53237: Now reverse works for Diagonal, Bidiagonal, Tridiagonal, SymTridiagonal, Symmetric, Hermitian, Uppertriangular, LowerTriangular and UpperHessenberg matrices.

@Sahiti004 Sahiti004 changed the title This pull request addresses issue #53237, now reverse works for Diagonal, Bidiagonal, Tridiagonal, SymTridiagonal, Symmetric, Hermitian, Uppertriangular, LowerTriangular and UpperHessenberg This pull request resolves issue #53237, now reverse works for Diagonal, Bidiagonal, Tridiagonal, SymTridiagonal, Symmetric, Hermitian, Uppertriangular, LowerTriangular and UpperHessenberg Apr 24, 2024
@Sahiti004 Sahiti004 changed the title This pull request resolves issue #53237, now reverse works for Diagonal, Bidiagonal, Tridiagonal, SymTridiagonal, Symmetric, Hermitian, Uppertriangular, LowerTriangular and UpperHessenberg This pull request resolves #53237, now reverse works for Diagonal, Bidiagonal, Tridiagonal, SymTridiagonal, Symmetric, Hermitian, Uppertriangular, LowerTriangular and UpperHessenberg Apr 24, 2024
@tecosaur tecosaur added the domain:linear algebra Linear algebra label Apr 24, 2024
@tecosaur
Copy link
Contributor

Thanks for making this PR @Sahiti004! It's great to see such a quick turnaround from your involvement in #53237.

I'll just tidy up the PR title/description a bit to make it fit a little better with the usual "subject line + description" format 🙂

@Sahiti004 Sahiti004 closed this Apr 24, 2024
@tecosaur tecosaur changed the title This pull request resolves #53237, now reverse works for Diagonal, Bidiagonal, Tridiagonal, SymTridiagonal, Symmetric, Hermitian, Uppertriangular, LowerTriangular and UpperHessenberg Implement reverse for more Matrix variants Apr 24, 2024
@Sahiti004 Sahiti004 reopened this Apr 24, 2024
Copy link
Member

@LilithHafner LilithHafner left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

stdlib/LinearAlgebra/src/bidiag.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/diagonal.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/hessenberg.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/hessenberg.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/symmetric.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/triangular.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/triangular.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/triangular.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/triangular.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/tridiag.jl Outdated Show resolved Hide resolved
@stevengj
Copy link
Member

Your tests should also check the in-place case, e.g. test:

@test reverse!(copy(A)) = reverse(A) == reverse!(Matrix(A))

Sahiti004 and others added 6 commits May 3, 2024 02:10
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Sahiti004 and others added 10 commits May 3, 2024 15:55
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Co-authored-by: Steven G. Johnson <stevenj@mit.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reverse(A, dims=...) doesn't work for Diagonal, Tridiagonal, etcetera
4 participants