Skip to content

Commit 1eabdbf

Browse files
authored
MAINT: Replace np.int (#596)
1 parent 5b29877 commit 1eabdbf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

quantecon/game_theory/game_generators/bimatrix_generators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _populate_blotto_payoff_arrays(payoff_arrays, actions, values):
197197
for p in range(2):
198198
payoffs[p] += values[k, p] / 2
199199
else:
200-
winner = np.int(actions[i, k] < actions[j, k])
200+
winner = np.intp(actions[i, k] < actions[j, k])
201201
payoffs[winner] += values[k, winner]
202202
payoff_arrays[0][i, j], payoff_arrays[1][j, i] = payoffs
203203

quantecon/random/utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def _sample_without_replacement(n, r, out):
164164
# Logic taken from random.sample in the standard library
165165
pool = np.arange(n)
166166
for j in range(k):
167-
idx = int(np.floor(r[j] * (n-j))) # np.floor returns a float
167+
idx = np.intp(np.floor(r[j] * (n-j))) # np.floor returns a float
168168
out[j] = pool[idx]
169169
pool[idx] = pool[n-j-1]
170170

quantecon/util/tests/test_numba.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_comb_zeros(self):
6565

6666
eq_(comb_jit(self.MAX_INTP, 2), 0)
6767

68-
N = np.int(self.MAX_INTP**0.5 * 2**0.5) + 1
68+
N = np.intp(self.MAX_INTP**0.5 * 2**0.5) + 1
6969
eq_(comb_jit(N, 2), 0)
7070

7171
def test_max_intp(self):

0 commit comments

Comments
 (0)