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

Adjoint vector, matrix multiplication ambiguous #1252

Open
jariji opened this issue Aug 31, 2024 · 0 comments
Open

Adjoint vector, matrix multiplication ambiguous #1252

jariji opened this issue Aug 31, 2024 · 0 comments

Comments

@jariji
Copy link

jariji commented Aug 31, 2024

Multiplying an adjoint vector by a symbolic matrix fails.

julia> let A = (@variables A[1:10,1:3])[], x = collect(1.0:10)
           x'*A
       end
ERROR: MethodError: *(::Adjoint{Float64, Vector{Float64}}, ::Symbolics.Arr{Num, 2}) is ambiguous.

Candidates:
  *(x::Adjoint{T, <:AbstractVector} where T, A::AbstractMatrix)
    @ LinearAlgebra /nix/store/2j9mrc4cv7ry3581wxy3nbw6qb215dwd-julia-bin-1.10.3/share/julia/stdlib/v1.10/LinearAlgebra/src/matmul.jl:87
  *(A::AbstractMatrix, B::Symbolics.Arr{<:Any, 2})
    @ Symbolics ~/.julia/packages/Symbolics/h6iug/src/wrapper-types.jl:158

Possible fix, define
  *(::Adjoint{T, <:AbstractVector} where T, ::Symbolics.Arr{<:Any, 2})

Symbolics v6.1.0
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