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

Missing Method for StaticArrays #167

Open
btmit opened this issue Jun 21, 2022 · 0 comments
Open

Missing Method for StaticArrays #167

btmit opened this issue Jun 21, 2022 · 0 comments

Comments

@btmit
Copy link

btmit commented Jun 21, 2022

Looks like there are still a few things hiding out that use Matrix instead of AbstractMatrix.

Here's one example:

julia> a=PDMat(SMatrix{3,3}([ 0.880022  0.646205  0.598234
        0.646205  0.578793  0.449772
        0.598234  0.449772  1.33728]))
3×3 PDMat{Float64, SMatrix{3, 3, Float64, 9}}:
 0.880022  0.646205  0.598234
 0.646205  0.578793  0.449772
 0.598234  0.449772  1.33728

julia> b = PDiagMat(SVector{3}([0.558713 0.384665 0.469067]))
3×3 PDiagMat{Float64, SVector{3, Float64}}:
 0.558713  0.0       0.0
 0.0       0.384665  0.0
 0.0       0.0       0.469067

julia> a+b
ERROR: MethodError: no method matching _adddiag(::SMatrix{3, 3, Float64, 9}, ::SVector{3, Float64})

However, a+a and b+b work. So does a+b when both are constructing from normal matrices.

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

No branches or pull requests

1 participant