No method matching isless(::Array{Float64,2}, ::Array{Float64,2})

When I call the Optimizer.jl package, the following error occurs:

MethodError: no method matching isless(::Array{Float64,2}, ::Array{Float64,2})

Because of the size of my program, I can’t construct an example to replicate this error. I try to provide the parameter characteristics of the function I call.

optimize(f,g!,I_A,LBFGS())

MethodError: no method matching isless(::Array{Float64,2}, ::Array{Float64,2})
Closest candidates are:
isless(!Matched::Missing, ::Any) at missing.jl:87
isless(::Any, !Matched::Missing) at missing.jl:88
.
Stacktrace:
[1] <(::Array{Float64,2}, ::Array{Float64,2}) at .\operators.jl:277
[2] >(::Array{Float64,2}, ::Array{Float64,2}) at .\operators.jl:303
[3] maxdiff(::VectorOfArray{Float64,3,Array{Array{Float64,2},1}}, ::VectorOfArray{Float64,3,Array{Array{Float64,2},1}}) at C:\Users\Fu Yangfeng.julia\packages\Optim\auGGa\src\utilities\maxdiff.jl:5
[4] x_abschange at C:\Users\Fu Yangfeng.julia\packages\Optim\auGGa\src\utilities\assess_convergence.jl:7 [inlined]
[5] x_abschange at C:\Users\Fu Yangfeng.julia\packages\Optim\auGGa\src\utilities\assess_convergence.jl:6 [inlined]
[6] optimize(::OnceDifferentiable{Float64,VectorOfArray{Float64,3,Array{Array{Float64,2},1}},VectorOfArray{Float64,3,Array{Array{Float64,2},1}}}, ::VectorOfArray{Float64,3,Array{Array{Float64,2},1}}, ::LBFGS{Nothing,LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Optim.var"#15#17"}, ::Optim.Options{Float64,Nothing}, ::Optim.LBFGSState{VectorOfArray{Float64,3,Array{Array{Float64,2},1}},Array{VectorOfArray{Float64,3,Array{Array{Float64,2},1}},1},Array{VectorOfArray{Float64,3,Array{Array{Float64,2},1}},1},Float64,VectorOfArray{Float64,3,Array{Array{Float64,2},1}}}) at C:\Users\Fu Yangfeng.julia\packages\Optim\auGGa\src\multivariate\optimize\optimize.jl:103
[7] optimize(::OnceDifferentiable{Float64,VectorOfArray{Float64,3,Array{Array{Float64,2},1}},VectorOfArray{Float64,3,Array{Array{Float64,2},1}}}, ::VectorOfArray{Float64,3,Array{Array{Float64,2},1}}, ::LBFGS{Nothing,LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Optim.var"#15#17"}, ::Optim.Options{Float64,Nothing}) at C:\Users\Fu Yangfeng.julia\packages\Optim\auGGa\src\multivariate\optimize\optimize.jl:33
[8] optimize(::Function, ::Function, ::VectorOfArray{Float64,3,Array{Array{Float64,2},1}}, ::LBFGS{Nothing,LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Optim.var"#15#17"}, ::Optim.Options{Float64,Nothing}; inplace::Bool, autodiff::Symbol) at C:\Users\Fu Yangfeng.julia\packages\Optim\auGGa\src\multivariate\optimize\interface.jl:155
[9] optimize(::Function, ::Function, ::VectorOfArray{Float64,3,Array{Array{Float64,2},1}}, ::LBFGS{Nothing,LineSearches.InitialStatic{Float64},LineSearches.HagerZhang{Float64,Base.RefValue{Bool}},Optim.var"#15#17"}, ::Optim.Options{Float64,Nothing}) at C:\Users\Fu Yangfeng.julia\packages\Optim\auGGa\src\multivariate\optimize\interface.jl:153 (repeats 2 times)
[10] top-level scope at In[19]:1
[11] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091
[12] execute_code(::String, ::String) at C:\Users\Fu Yangfeng.julia\packages\IJulia\rWZ9e\src\execute_request.jl:27
[13] execute_request(::ZMQ.Socket, ::IJulia.Msg) at C:\Users\Fu Yangfeng.julia\packages\IJulia\rWZ9e\src\execute_request.jl:86
[14] #invokelatest#1 at .\essentials.jl:710 [inlined]
[15] invokelatest at .\essentials.jl:709 [inlined]
[16] eventloop(::ZMQ.Socket) at C:\Users\Fu Yangfeng.julia\packages\IJulia\rWZ9e\src\eventloop.jl:8
[17] (::IJulia.var"#15#18")() at .\task.jl:356

The type of I_A is Array{Array{Float64,2},1}. I guess that one step in Optimal. jl compares the size of elements in A, but the isless() does not support the comparison of two matrices. What should I do?

Can you give us the code for f and g!? There could be an issue in the way that you’ve defined those functions.