diff --git a/copt/constraint.py b/copt/constraint.py index 989e130..c6990ac 100644 --- a/copt/constraint.py +++ b/copt/constraint.py @@ -76,7 +76,7 @@ def __call__(self, x): if np.abs(x).sum() <= self.alpha: return 0 else: - return np.infty + return np.inf def prox(self, x, step_size=None): """Projection onto the L-infinity ball. diff --git a/copt/proximal_gradient.py b/copt/proximal_gradient.py index 3e1fab0..b7acfc3 100644 --- a/copt/proximal_gradient.py +++ b/copt/proximal_gradient.py @@ -121,7 +121,7 @@ def _prox(x, _): prox = _prox success = False - certificate = np.NaN + certificate = np.nan func_and_grad = utils.build_func_grad(jac, fun, args, eps) diff --git a/copt/splitting.py b/copt/splitting.py index 8b26026..c8ca10a 100644 --- a/copt/splitting.py +++ b/copt/splitting.py @@ -288,7 +288,7 @@ def prox_2_conj(x, ss): ss_ratio = tau / sigma fk, grad_fk = f_grad(x) - norm_incr = np.infty + norm_incr = np.inf x_next = x.copy() for it in range(max_iter): diff --git a/copt/utils.py b/copt/utils.py index 70284aa..7f6be72 100644 --- a/copt/utils.py +++ b/copt/utils.py @@ -35,7 +35,7 @@ def wrapper(*args, **kwargs): def build_func_grad(jac, fun, args, eps): if not callable(jac): if bool(jac): - fun = optimize.optimize.MemoizeJac(fun) + fun = optimize._optimize.MemoizeJac(fun) jac = fun.derivative elif jac == "2-point": jac = None