Yes, that is exactly right - I’ve literally discovered this just now!
This throws the error:
params0 = [1.0, 0.1, 0.9]
A = sparse([
0 -1 1 # integers here
])
problem = ADNLPModels.ADNLPModel(
nll, params0,
[0, 0, 0], # these are integers
[Inf, Inf, 1],
A, [0], [Inf] # 0 is an integer!
)
Change ints to float - and now it works:
A = sparse([
0. -1 1 # note floating-point literal here
])
problem = ADNLPModels.ADNLPModel(
nll, params0,
[0, 0, 0.], [Inf, Inf, 1], # floats everywhere
A, [0.], [Inf] # 0. is a float
)
IMO this is extremely confusing. The error message doesn’t say anything about element types at all.