You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following snippet produces an ambiguity error from the last statement (JuMP v0.21.3, julia v1.5-rc1)
using JuMP, SCS
model =Model(SCS.Optimizer)
n =10
V =randn(n,n)
@variable(model, G[n, n])
B = V*G*V'
MethodError: similar(::JuMP.Containers.DenseAxisArray{VariableRef,2,Tuple{Int64,Int64},Tuple{Dict{Int64,Int64},Dict{Int64,Int64}}}, ::Type{GenericAffExpr{Float64,VariableRef}}, ::Tuple{Int64,Int64}) is ambiguous. Candidates:
similar(A::JuMP.Containers.DenseAxisArray{T,N,Ax,L} where L<:Tuple{Vararg{Dict,N}}, ::Type{S}, axes::Ax) where {T, N, Ax, S} in JuMP.Containers at /home/fredrikb/.julia/packages/JuMP/YXK4e/src/Containers/DenseAxisArray.jl:102
similar(a::AbstractArray, ::Type{T}, dims::Tuple{Vararg{Int64,N}}) where {T, N} in Base at abstractarray.jl:636
Possible fix, define
similar(::JuMP.Containers.DenseAxisArray{T,N,Ax,L} where L<:Tuple{Vararg{Dict,N}}, ::Type{T}, ::Ax) where {T, N, T, N, Ax<:Tuple{Vararg{Int64,N}}}
*(::Array{Float64,2}, ::JuMP.Containers.DenseAxisArray{VariableRef,2,Tuple{Int64,Int64},Tuple{Dict{Int64,Int64},Dict{Int64,Int64}}}) at matmul.jl:153
*(::Array{Float64,2}, ::JuMP.Containers.DenseAxisArray{VariableRef,2,Tuple{Int64,Int64},Tuple{Dict{Int64,Int64},Dict{Int64,Int64}}}, ::Adjoint{Float64,Array{Float64,2}}) at operators.jl:538
top-level scope at runtests.jl:316
include_string(::Function, ::Module, ::String, ::String) at loading.jl:1088
The text was updated successfully, but these errors were encountered:
The following snippet produces an ambiguity error from the last statement (JuMP v0.21.3, julia v1.5-rc1)
The text was updated successfully, but these errors were encountered: