Skip to content

Commit fb97bd0

Browse files
committed
Removed np.int to avoid deprecation warning
1 parent 8abdd58 commit fb97bd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dfols/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def __init__(self, npt, x0, r0, xl, xu, r0_nsamples, n=None, m=None, abs_tol=1e-
7171
self.fval = np.inf * np.ones((npt, )) # overall objective value for each xpt
7272
self.fval[0] = sumsq(r0)
7373
self.kopt = 0 # index of current iterate (should be best value so far)
74-
self.nsamples = np.zeros((npt,), dtype=np.int) # number of samples used to evaluate objective at each point
74+
self.nsamples = np.zeros((npt,), dtype=int) # number of samples used to evaluate objective at each point
7575
self.nsamples[0] = r0_nsamples
7676
self.fbeg = self.fval[0] # f(x0), saved to check for sufficient reduction
7777

dfols/trust_region.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def trsbox(xopt, g, H, sl, su, delta, use_fortran=USE_FORTRAN):
103103
iterc = 0
104104
nact = 0 # number of fixed variables
105105

106-
xbdi = np.zeros((n,), dtype=np.int) # fix x_i at bounds? [values -1, 0, 1]
106+
xbdi = np.zeros((n,), dtype=int) # fix x_i at bounds? [values -1, 0, 1]
107107
xbdi[(xopt <= sl) & (g >= 0.0)] = -1
108108
xbdi[(xopt >= su) & (g <= 0.0)] = 1
109109

0 commit comments

Comments
 (0)