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

Fix bug in pinv #1082

Merged
merged 3 commits into from
Aug 20, 2022
Merged

Fix bug in pinv #1082

merged 3 commits into from
Aug 20, 2022

Conversation

hyrodium
Copy link
Collaborator

This PR fixes #1080.

Before this PR

julia> using StaticArrays, LinearAlgebra

julia> pinv([-1 0; 0 -1])
2×2 Matrix{Float64}:
 -1.0   0.0
  0.0  -1.0

julia> pinv(SA[-1 0; 0 -1])
2×2 SMatrix{2, 2, Float64, 4} with indices SOneTo(2)×SOneTo(2):
 0.0  0.0
 0.0  0.0

After this PR

julia> using StaticArrays, LinearAlgebra

julia> pinv([-1 0; 0 -1])
2×2 Matrix{Float64}:
 -1.0   0.0
  0.0  -1.0

julia> pinv(SA[-1 0; 0 -1])
2×2 SMatrix{2, 2, Float64, 4} with indices SOneTo(2)×SOneTo(2):
 -1.0   0.0
  0.0  -1.0

@hyrodium hyrodium merged commit 0f68fdb into JuliaArrays:master Aug 20, 2022
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.

problem with pinv
2 participants