Skip to content

Commit 7207b9a

Browse files
authored
[career] Remove int()
1 parent 2abf38b commit 7207b9a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lectures/career.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,9 @@ def gen_path(optimal_policy, F, G, t=20):
433433
if greedy_star[i, j] == 1: # Stay put
434434
pass
435435
elif greedy_star[i, j] == 2: # New job
436-
j = int(qe.random.draw(G))
436+
j = qe.random.draw(G)
437437
else: # New life
438-
i, j = int(qe.random.draw(F)), int(qe.random.draw(G))
438+
i, j = qe.random.draw(F), qe.random.draw(G)
439439
θ_index.append(i)
440440
ϵ_index.append(j)
441441
return cw.θ[θ_index], cw.ϵ[ϵ_index]
@@ -472,9 +472,9 @@ def passage_time(optimal_policy, F, G):
472472
if optimal_policy[i, j] == 1: # Stay put
473473
return t
474474
elif optimal_policy[i, j] == 2: # New job
475-
j = int(qe.random.draw(G))
475+
j = qe.random.draw(G)
476476
else: # New life
477-
i, j = int(qe.random.draw(F)), int(qe.random.draw(G))
477+
i, j = qe.random.draw(F), qe.random.draw(G)
478478
t += 1
479479
480480
@njit(parallel=True)

0 commit comments

Comments
 (0)