1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
Description: Fix test failure with Numpy 1.24.
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: not-needed
Bug-Debian: https://bugs.debian.org/1027217
--- a/pymbar/testsystems/exponential_distributions.py
+++ b/pymbar/testsystems/exponential_distributions.py
@@ -138,7 +138,7 @@ class ExponentialTestCase(object):
x_kn = np.zeros([self.n_states, N_max], np.float64)
u_kln = np.zeros([self.n_states, self.n_states, N_max], np.float64)
x_n = np.zeros([N_tot], np.float64)
- s_n = np.zeros([N_tot], np.int)
+ s_n = np.zeros([N_tot], int)
u_kn = np.zeros([self.n_states, N_tot], np.float64)
index = 0
for k, N in enumerate(N_k):
--- a/pymbar/testsystems/harmonic_oscillators.py
+++ b/pymbar/testsystems/harmonic_oscillators.py
@@ -145,7 +145,7 @@ class HarmonicOscillatorsTestCase(object
x_kn = np.zeros([self.n_states, N_max], np.float64)
u_kln = np.zeros([self.n_states, self.n_states, N_max], np.float64)
x_n = np.zeros([N_tot], np.float64)
- s_n = np.zeros([N_tot], np.int)
+ s_n = np.zeros([N_tot], int)
u_kn = np.zeros([self.n_states, N_tot], np.float64)
index = 0
for k, N in enumerate(N_k):
--- a/pymbar/tests/test_mbar.py
+++ b/pymbar/tests/test_mbar.py
@@ -374,7 +374,7 @@ def test_mbar_computePMF():
xmin = test.O_k[refstate] - 1
xmax = test.O_k[refstate] + 1
within_bounds = (x_n >= xmin) & (x_n < xmax)
- bin_centers = dx*np.arange(np.int(xmin/dx),np.int(xmax/dx)) + dx/2
+ bin_centers = dx*np.arange(int(xmin/dx),int(xmax/dx)) + dx/2
bin_n = np.zeros(len(x_n),int)
bin_n[within_bounds] = 1 + np.floor((x_n[within_bounds]-xmin)/dx)
# 0 is reserved for samples outside the domain. We will ignore this state
|