From 7207b9ac7970e2afcae34fa0089cb8a105cd942c Mon Sep 17 00:00:00 2001 From: kuramogura <85446452+kuramogura@users.noreply.github.com> Date: Mon, 19 Jul 2021 18:11:41 +0900 Subject: [PATCH] [career] Remove int() --- lectures/career.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lectures/career.md b/lectures/career.md index 8f682b837..18ee3c7e3 100644 --- a/lectures/career.md +++ b/lectures/career.md @@ -433,9 +433,9 @@ def gen_path(optimal_policy, F, G, t=20): if greedy_star[i, j] == 1: # Stay put pass elif greedy_star[i, j] == 2: # New job - j = int(qe.random.draw(G)) + j = qe.random.draw(G) else: # New life - i, j = int(qe.random.draw(F)), int(qe.random.draw(G)) + i, j = qe.random.draw(F), qe.random.draw(G) θ_index.append(i) ϵ_index.append(j) return cw.θ[θ_index], cw.ϵ[ϵ_index] @@ -472,9 +472,9 @@ def passage_time(optimal_policy, F, G): if optimal_policy[i, j] == 1: # Stay put return t elif optimal_policy[i, j] == 2: # New job - j = int(qe.random.draw(G)) + j = qe.random.draw(G) else: # New life - i, j = int(qe.random.draw(F)), int(qe.random.draw(G)) + i, j = qe.random.draw(F), qe.random.draw(G) t += 1 @njit(parallel=True)