Skip to content

Fix zero() for LinearAlgebra wrappers over StaticArrays#1337

Merged
mateuszbaran merged 3 commits intoJuliaArrays:masterfrom
aplavin:fix-zero-wrapper-types
Mar 11, 2026
Merged

Fix zero() for LinearAlgebra wrappers over StaticArrays#1337
mateuszbaran merged 3 commits intoJuliaArrays:masterfrom
aplavin:fix-zero-wrapper-types

Conversation

@aplavin
Copy link
Member

@aplavin aplavin commented Mar 9, 2026

`zero(Symmetric(smatrix))`, `zero(Diagonal(svector))`, etc. failed because `zero` was not defined for LinearAlgebra wrapper types over StaticArrays.

Fix: add `zero` methods for `Symmetric`, `Hermitian`, `UpperTriangular`, `LowerTriangular`, `UnitUpperTriangular`, `UnitLowerTriangular`, `Transpose`, `Adjoint`, and `Diagonal` wrapping StaticArrays.

@mateuszbaran
Copy link
Collaborator

Could you bump the patch version here? I would make a new release with your patches.

@aplavin
Copy link
Member Author

aplavin commented Mar 10, 2026

sure! thanks a lot for being so responsive

@mateuszbaran mateuszbaran merged commit f02280c into JuliaArrays:master Mar 11, 2026
17 of 24 checks passed
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.

2 participants