Functor usage for Optim.jl

It looks like that the multivariate interface does not restrict to Function, but the univariate one does. See

https://github.com/JuliaNLSolvers/Optim.jl/blob/431a5f97f814f9df17b24fe429fcc7b9af3c9577/src/univariate/optimize/interface.jl#L2

I don’t think this is necessary — please check if there is an existing issue and open one if there isn’t. In the meantime, @liuyxpp’s workaround using a closure should help.

2 Likes