File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -404,7 +404,7 @@ class McCallModel:
404404 # Evaluate value for each state-action pair
405405 # Consider action = accept or reject the current offer
406406 accept = w[i] / (1 - β)
407- reject = c + β * np.sum (v * q)
407+ reject = c + β * (v @ q)
408408
409409 return np.array([accept, reject])
410410```
@@ -488,7 +488,7 @@ def compute_reservation_wage(mcm,
488488
489489 # == Now compute the reservation wage == #
490490
491- return (1 - β) * (c + β * np.sum (v * q))
491+ return (1 - β) * (c + β * (v @ q))
492492```
493493
494494The next line computes the reservation wage at default parameters
@@ -622,13 +622,13 @@ def compute_reservation_wage_two(mcm,
622622
623623 # == First compute h == #
624624
625- h = np.sum (w * q) / (1 - β)
625+ h = (w @ q) / (1 - β)
626626 i = 0
627627 error = tol + 1
628628 while i < max_iter and error > tol:
629629
630630 s = np.maximum(w / (1 - β), h)
631- h_next = c + β * np.sum (s * q)
631+ h_next = c + β * (s @ q)
632632
633633 error = np.abs(h_next - h)
634634 i += 1
You can’t perform that action at this time.
0 commit comments