julia> using OptimizationProblems
julia> using NLPModelsJuMP
julia> model = MathProgNLPModel(hs6());
julia> xx = rand(5);
julia> x = @view xx[2:3];
julia> obj(model, x)
ERROR: MethodError: no method matching forward_eval(::Array{Float64,1}, ::Array{Float64,1}, ::Array{ReverseDiffSparse.NodeData,1}, ::SparseMatrixCSC{Bool,Int64}, ::Array{Float64,1}, ::Array{Float64,1}, ::SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}, ::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}; user_operators=ReverseDiffSparse.UserOperatorRegistry(Dict{Symbol,Int64}(), MathProgBase.SolverInterface.AbstractNLPEvaluator[], Dict{Symbol,Int64}(), Any[], Any[], Any[]))
Closest candidates are:
forward_eval(::Array{T,1}, ::AbstractArray{T,1}, ::AbstractArray{ReverseDiffSparse.NodeData,1}, ::Any, ::Any, ::Any, ::Array{T,1}, ::Any, ::Any, ::Any; user_operators) where T at /Users/dpo/.julia/v0.6/ReverseDiffSparse/src/forward.jl:20
forward_eval(::Array{T,1}, ::AbstractArray{T,1}, ::AbstractArray{ReverseDiffSparse.NodeData,1}, ::Any, ::Any, ::Any, ::Array{T,1}, ::Any, ::Any) where T at /Users/dpo/.julia/v0.6/ReverseDiffSparse/src/forward.jl:20 got unsupported keyword argument "user_operators"
forward_eval(::Array{T,1}, ::AbstractArray{T,1}, ::AbstractArray{ReverseDiffSparse.NodeData,1}, ::Any, ::Any, ::Any, ::Array{T,1}, ::Any) where T at /Users/dpo/.julia/v0.6/ReverseDiffSparse/src/forward.jl:20 got unsupported keyword argument "user_operators"
Stacktrace:
[1] forward_eval_all(::JuMP.NLPEvaluator, ::SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}) at /Users/dpo/.julia/v0.6/JuMP/src/nlp.jl:445
[2] eval_f(::JuMP.NLPEvaluator, ::SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}) at /Users/dpo/.julia/v0.6/JuMP/src/nlp.jl:477
[3] obj(::NLPModelsJuMP.MathProgNLPModel, ::SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}) at /Users/dpo/.julia/v0.6/NLPModelsJuMP/src/mpb_model.jl:131