JuliaArrays / JuliaArrays/StaticArrays.jl
cholesky! does not modify MMatrix
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 844
- Forks
- 159
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Description
I am fairly new to using StaticArrays, so I do not know if this is intended or not but it caught me by surprise as this is different behaviour when compared to the standard cholesky! functionality from LinearAlgebra. I believe the reason for this behaviour can be found in the following line
which can be seen to return a new data.
MWE:
# Standard LinearAlgebra
S = Matrix(2.0I(3))
cholesky!(S)
S # S is changed
# StaticArrays
T = MMatrix{3,3,Float64,9}(2I(3))
cholesky!(T)
T # T has not changed
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/cholesky.jl at line 11 and reproduce the MWE using an MMatrix alongside the standard LinearAlgebra case. Compare the mutation behavior and establish whether the StaticArrays implementation should leave the supplied MMatrix containing the factorization, then verify the corrected behavior with a focused test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100