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 PDiagMat #176

Open
btmit opened this issue Aug 4, 2023 · 1 comment · May be fixed by #205
Open

Missing * method for PDiagMat #176

btmit opened this issue Aug 4, 2023 · 1 comment · May be fixed by #205

Comments

@btmit
Copy link

btmit commented Aug 4, 2023

ERROR: MethodError: *(::PDMats.PDiagMat{Float64, Vector{Float64}}, ::Diagonal{Float64, Vector{Float64}}) is ambiguous.

Candidates:
  *(A::AbstractMatrix, D::Diagonal)
    @ LinearAlgebra /Applications/Julia-1.9.app/Contents/Resources/julia/share/julia/stdlib/v1.9/LinearAlgebra/src/diagonal.jl:247
  *(a::PDMats.PDiagMat, x::AbstractMatrix)
    @ PDMats ~/.julia/packages/PDMats/CbBv1/src/pdiagmat.jl:51

Possible fix, define
  *(::PDMats.PDiagMat, ::Diagonal)
@RomeoV
Copy link

RomeoV commented Jun 12, 2024

A workaround is to change

pdmat * diagmat

to

(diagmat * pdmat)'

since they are both symmetric.

@devmotion devmotion linked a pull request Jun 12, 2024 that will close this issue
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 a pull request may close this issue.

2 participants