Skip to content

Commit 7b869ca

Browse files
committed
Merge branch 'main' into i-139
2 parents 4dcd462 + 352057d commit 7b869ca

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

.github/workflows/cache.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches:
55
- main
6+
schedule:
7+
# run cache monthly to prevent expiration
8+
- cron: '0 0 1 * *'
69
jobs:
710
tests:
811
runs-on: ubuntu-latest

environment.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ channels:
33
- default
44
dependencies:
55
- python=3.10
6-
- anaconda=2023.03
6+
- anaconda=2023.07
77
- pip
88
- pip:
99
- jupyter-book==0.15.1
10-
- quantecon-book-theme==0.4.1
10+
- docutils==0.17.1
11+
- quantecon-book-theme==0.5.3
1112
- sphinx-tojupyter==0.3.0
1213
- sphinxext-rediraffe==0.2.7
1314
- sphinx-exercise==0.4.1

lectures/_static/lecture_specific/amss2/recursive_allocation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def simulate(self, B_, s_0, T, sHist=None):
142142

143143
cHist[t], nHist[t], Bhist[t], ΤHist[t] = c[s], n[s], x / Eu_c, Τ
144144
xHist[t], THist[t] = xprime[s], T[s]
145-
return np.array([cHist, nHist, Bhist, ΤHist, THist, μHist, sHist, xHist])
145+
return [cHist, nHist, Bhist, ΤHist, THist, μHist, sHist, xHist]
146146

147147

148148
class BellmanEquation:

lectures/_static/lecture_specific/amss2/sequential_allocation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,4 @@ def simulate(self, B_, s_0, T, sHist=None):
155155
RHist[t - 1] = Uc(cHist[t - 1], nHist[t - 1]) / (β * Eu_c)
156156
μHist[t] = μ
157157

158-
return np.array([cHist, nHist, Bhist, ΤHist, sHist, μHist, RHist])
158+
return [cHist, nHist, Bhist, ΤHist, sHist, μHist, RHist]

lectures/_static/lecture_specific/opt_tax_recur/sequential_allocation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def implementability(self, Φ, b0, s0, cn0_arr):
127127
n0 = c0 + g0
128128
l0 = 1 - n0
129129

130-
cn0_arr[:] = c0, n0
130+
cn0_arr[:] = c0.item(), n0.item()
131131

132132
LHS = Uc(c0, l0) * b0
133133
RHS = Uc(c0, l0) * c0 - Ul(c0, l0) * n0 + β * π[s0] @ x

lectures/amss2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def solve_cb(unknowns, Φ, b_bar, s=1):
412412
+ Φ * (c0 * u.Ucc(c0, 1) + (c0 + g0) * u.Unn(1, c0 + g0)) \
413413
- Φ * u.Ucc(c0, 1) * b0
414414
415-
return np.array([eq1, eq2], dtype='float64')
415+
return np.array([eq1, eq2.item()], dtype='float64')
416416
```
417417

418418
To solve the equations for $c_0, b_0$, we use SciPy's fsolve function

0 commit comments

Comments
 (0)