Skip to content

Commit

Permalink
Remove use of MemoizeJac
Browse files Browse the repository at this point in the history
  • Loading branch information
nrontsis authored Dec 9, 2022
1 parent 9278cc5 commit 6e4180d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions cyipopt/scipy_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
# in scipy 0.14 Result was renamed to OptimizeResult
from scipy.optimize import Result
OptimizeResult = Result
try:
from scipy.optimize import MemoizeJac
except ImportError:
# The optimize.optimize namespace is being deprecated
from scipy.optimize.optimize import MemoizeJac

import cyipopt

Expand Down Expand Up @@ -91,7 +86,6 @@ def __init__(self,
jac = lambda x0, *args, **kwargs: approx_fprime(
x0, fun, eps, *args, **kwargs)
elif jac is True:
fun = MemoizeJac(fun)
jac = fun.derivative
elif not callable(jac):
raise NotImplementedError('jac has to be bool or a function')
Expand All @@ -117,7 +111,6 @@ def __init__(self,
con_jac = lambda x0, *args, **kwargs: approx_fprime(
x0, con_fun, eps, *args, **kwargs)
elif con_jac is True:
con_fun = MemoizeJac(con_fun)
con_jac = con_fun.derivative
elif not callable(con_jac):
raise NotImplementedError('jac has to be bool or a function')
Expand Down

0 comments on commit 6e4180d

Please sign in to comment.