diff --git a/cyipopt/scipy_interface.py b/cyipopt/scipy_interface.py index f7d3fed7..35667eed 100644 --- a/cyipopt/scipy_interface.py +++ b/cyipopt/scipy_interface.py @@ -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 @@ -90,9 +85,6 @@ def __init__(self, if jac is None: 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') self.fun = fun @@ -116,11 +108,8 @@ def __init__(self, if con_jac is None: 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') + raise NotImplementedError('jac has to be a function') if (self.obj_hess is not None and con_hessian is None) or (self.obj_hess is None and con_hessian is not None):