Skip to content

Commit 3fe41a1

Browse files
authored
Merge pull request #173 from kuramogura/patch-5
[career] Remove int()
2 parents fbc066b + e3bb23d commit 3fe41a1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lectures/career.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,10 +433,12 @@ def gen_path(optimal_policy, F, G, t=20):
433433
for t in range(t):
434434
if optimal_policy[i, j] == 1: # Stay put
435435
pass
436-
elif optimal_policy[i, j] == 2: # New job
437-
j = int(qe.random.draw(G))
436+
437+
elif greedy_star[i, j] == 2: # New job
438+
j = qe.random.draw(G)
439+
438440
else: # New life
439-
i, j = int(qe.random.draw(F)), int(qe.random.draw(G))
441+
i, j = qe.random.draw(F), qe.random.draw(G)
440442
θ_index.append(i)
441443
ϵ_index.append(j)
442444
return cw.θ[θ_index], cw.ϵ[ϵ_index]
@@ -473,9 +475,9 @@ def passage_time(optimal_policy, F, G):
473475
if optimal_policy[i, j] == 1: # Stay put
474476
return t
475477
elif optimal_policy[i, j] == 2: # New job
476-
j = int(qe.random.draw(G))
478+
j = qe.random.draw(G)
477479
else: # New life
478-
i, j = int(qe.random.draw(F)), int(qe.random.draw(G))
480+
i, j = qe.random.draw(F), qe.random.draw(G)
479481
t += 1
480482
481483
@njit(parallel=True)

0 commit comments

Comments
 (0)