Skip to content

Commit

Permalink
Removed remaining np.int references
Browse files Browse the repository at this point in the history
  • Loading branch information
lindonroberts committed Apr 14, 2021
1 parent 84d8dce commit 3fcd86a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pybobyqa/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion pybobyqa/trust_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3fcd86a

Please sign in to comment.