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
This way, the error will move to user code, because then I'll be calling this constructor with (Tv = eltype(x0)) === Float64, but the AbstractSparseMatrix would need Tv = eltype(A) == Int64.
The text was updated successfully, but these errors were encountered:
Code
Output
Problem
Turns out, this happens because
A
is a matrix of integers, but the error message doesn't tell me this.Also, I'm not calling
ADNLPModels.ADNLPModel(::var"#1#2", ::Vector{Float64}, ::Vector{Float64}, ::Vector{Float64}, ::Vector{Int64}, ::Vector{Int64}, ::Vector{Int64}, ::Vector{Float64}, ::Vector{Float64})
- the package tries to call it here:ADNLPModels.jl/src/nlp.jl
Lines 358 to 369 in 5d917ce
The signature of this method doesn't constrain
S
orTv
in any way. Why not write:This way, the error will move to user code, because then I'll be calling this constructor with
(Tv = eltype(x0)) === Float64
, but theAbstractSparseMatrix
would needTv = eltype(A) == Int64
.The text was updated successfully, but these errors were encountered: