From 3fcd86a35607720185e54c9906f86a180bdb4a75 Mon Sep 17 00:00:00 2001 From: Lindon Roberts Date: Wed, 14 Apr 2021 10:26:01 +1000 Subject: [PATCH] Removed remaining np.int references --- pybobyqa/model.py | 2 +- pybobyqa/trust_region.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pybobyqa/model.py b/pybobyqa/model.py index 6a51923..ab4f558 100644 --- a/pybobyqa/model.py +++ b/pybobyqa/model.py @@ -65,7 +65,7 @@ def __init__(self, npt, x0, f0, xl, xu, f0_nsamples, n=None, abs_tol=-1e20, prec self.f_values = np.inf * np.ones((npt, )) # overall objective value for each xpt self.f_values[0] = f0 self.kopt = 0 # index of current iterate (should be best value so far) - self.nsamples = np.zeros((npt,), dtype=np.int) # number of samples used to evaluate objective at each point + self.nsamples = np.zeros((npt,), dtype=int) # number of samples used to evaluate objective at each point self.nsamples[0] = f0_nsamples self.fbeg = self.f_values[0] # f(x0), saved to check for sufficient reduction diff --git a/pybobyqa/trust_region.py b/pybobyqa/trust_region.py index f786e77..853d7de 100644 --- a/pybobyqa/trust_region.py +++ b/pybobyqa/trust_region.py @@ -88,7 +88,7 @@ def trsbox(xopt, g, H, sl, su, delta, use_fortran=USE_FORTRAN): iterc = 0 nact = 0 # number of fixed variables - xbdi = np.zeros((n,), dtype=np.int) # fix x_i at bounds? [values -1, 0, 1] + xbdi = np.zeros((n,), dtype=int) # fix x_i at bounds? [values -1, 0, 1] xbdi[(xopt <= sl) & (g >= 0.0)] = -1 xbdi[(xopt >= su) & (g <= 0.0)] = 1