Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ updates:
prefix: ⬆️
schedule:
interval: weekly

- package-ecosystem: "conda"
directory: "/"
commit-message:
prefix: ⬆️
schedule:
interval: weekly
ignore:
- dependency-name: "jupyter-book"
versions: [">=2.0"]
- dependency-name: "python"
# Python version should be constrained by the anaconda distribution version
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
- name: Display Pip Versions
shell: bash -l {0}
run: pip list
- name: Download "build" folder (cache)
uses: dawidd6/action-download-artifact@v11
with:
workflow: cache.yml
branch: main
name: build-cache
path: _build
# - name: Download "build" folder (cache)
# uses: dawidd6/action-download-artifact@v11
# with:
# workflow: cache.yml
# branch: main
# name: build-cache
# path: _build
# Build Assets (Download Notebooks and PDF via LaTeX)
- name: Build PDF from LaTeX
shell: bash -l {0}
Expand Down
7 changes: 4 additions & 3 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ channels:
- default
dependencies:
- python=3.13
- anaconda=2025.06
- anaconda=2025.12
- pip
- pip:
- jupyter-book==1.0.4post1
- quantecon-book-theme==0.9.3
- jupyter-book>=1.0.4post1,<2.0
- quantecon-book-theme==0.15.1
- sphinx-tojupyter==0.3.1
- sphinxext-rediraffe==0.2.7
- sphinx-exercise==1.0.1
- sphinx-proof==0.2.1
- sphinxcontrib-youtube==1.4.1
- sphinx-togglebutton==0.3.2
- sphinx-reredirects==0.1.4
- kaleido


2 changes: 1 addition & 1 deletion lectures/BCG_complete_mkts.md
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ fig.update_layout(width=500,
fig.update_layout(scene_camera=dict(eye=dict(x=2, y=-2, z=1.5)))

# Export to PNG file
Image(fig.to_image(format="png"))
Image(fig.to_image(format="png", engine="kaleido"))
# fig.show() will provide interactive plot when running
# notebook locally
```
10 changes: 5 additions & 5 deletions lectures/BCG_incomplete_mkts.md
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ fig.update_layout(scene_camera=dict(eye=dict(x=1.5, y=-1.5, z=2)))
fig.update_layout(title='Equilibrium firm valuation for the grid of (k,b)')

# Export to PNG file
Image(fig.to_image(format="png"))
Image(fig.to_image(format="png", engine="kaleido"))
# fig.show() will provide interactive plot when running
# code locally
```
Expand Down Expand Up @@ -1634,7 +1634,7 @@ fig.update_layout(title='Equilibrium firm valuation for the grid of (k,b)')


# Export to PNG file
Image(fig.to_image(format="png"))
Image(fig.to_image(format="png", engine="kaleido"))
# fig.show() will provide interactive plot when running
# code locally
```
Expand Down Expand Up @@ -1685,7 +1685,7 @@ fig.update_layout(scene_camera=dict(eye=dict(x=1.5, y=-1.5, z=2)))
fig.update_layout(title='Equilibrium firm valuation for the grid of (k,b)')

# Export to PNG file
Image(fig.to_image(format="png"))
Image(fig.to_image(format="png", engine="kaleido"))
# fig.show() will provide interactive plot when running
# code locally
```
Expand Down Expand Up @@ -1746,7 +1746,7 @@ fig.update_layout(title='Equilibrium equity valuation for the grid of (k,b)')


# Export to PNG file
Image(fig.to_image(format="png"))
Image(fig.to_image(format="png", engine="kaleido"))
# fig.show() will provide interactive plot when running
# code locally
```
Expand Down Expand Up @@ -1776,7 +1776,7 @@ fig.update_layout(title='Equilibrium bond valuation for the grid of (k,b)')


# Export to PNG file
Image(fig.to_image(format="png"))
Image(fig.to_image(format="png", engine="kaleido"))
# fig.show() will provide interactive plot when running
# code locally
```
Expand Down
2 changes: 2 additions & 0 deletions lectures/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ sphinx:
'https://doi.org/10.1086/262078',
'https://keras.io/',
'https://data.oecd.org/']
nb_merge_streams: true
nb_mime_priority_overrides: [
# HTML
['html', 'application/vnd.jupyter.widget-view+json', 10],
Expand Down Expand Up @@ -85,6 +86,7 @@ sphinx:
header_organisation: QuantEcon
repository_url: https://github.com/QuantEcon/lecture-python-advanced.myst
nb_repository_url: https://github.com/QuantEcon/lecture-python-advanced.notebooks
path_to_docs: lectures
twitter: quantecon
twitter_logo_url: https://assets.quantecon.org/img/qe-twitter-logo.png
og_logo_url: https://assets.quantecon.org/img/qe-og-logo.png
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,15 @@ def objf_prime(x):

epsilon = 1e-7
x0 = np.asarray(x, dtype=float)
f0 = np.atleast_1d(objf(x0))
jac = np.zeros([len(x0), len(f0)])
f0 = objf(x0)
grad = np.zeros(len(x0))
dx = np.zeros(len(x0))
for i in range(len(x0)):
dx[i] = epsilon
jac[i] = (objf(x0+dx) - f0)/epsilon
grad[i] = (objf(x0+dx) - f0)/epsilon
dx[i] = 0.0

return jac.transpose()
return grad

def cons(z):
c, n, xprime, T = z[:S], z[S:2 * S], z[2 * S:3 * S], z[3 * S:]
Expand Down
2 changes: 1 addition & 1 deletion lectures/knowing_forecasts_of_others.md
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ fig.update_layout(title=r'Impulse Response Function',
yaxis_title=r'$k^{i}_{t}$')
fig1 = fig
# Export to PNG file
Image(fig1.to_image(format="png"))
Image(fig1.to_image(format="png", engine="kaleido"))
# fig1.show() will provide interactive plot when running
# notebook locally
```
Expand Down
Loading