Skip to content

Commit 5f6b5ae

Browse files
fix variable names
1 parent 11f85c5 commit 5f6b5ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/OptimizationNLopt/src/OptimizationNLopt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,10 @@ function SciMLBase.__solve(cache::OptimizationCache{
232232
if cache.f.cons !== nothing
233233
eqinds = map((y) -> y[1] == y[2], zip(cache.lcons, cache.ucons))
234234
ineqinds = map((y) -> y[1] != y[2], zip(cache.lcons, cache.ucons))
235-
cons_cache = zeros(eltype(res), sum(eqinds) + sum(ineqinds))
235+
cons_cache = zeros(eltype(cache.u0), sum(eqinds) + sum(ineqinds))
236236
thetacache = rand(size(cache.u0))
237237
Jthetacache = rand(size(cache.u0))
238-
Jcache = zeros(eltype(J), sum(ineqinds) + sum(eqinds), length(θ))
238+
Jcache = zeros(eltype(cache.u0), sum(ineqinds) + sum(eqinds), length(cache.u0))
239239
evalcons = function (θ, ineqoreq)
240240
if thetacache != θ
241241
cache.f.cons(cons_cache, θ)

0 commit comments

Comments
 (0)