diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7809c2a9..04804108 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,16 @@ 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 + versions: [">0"] diff --git a/environment.yml b/environment.yml index e55f9368..f025c913 100644 --- a/environment.yml +++ b/environment.yml @@ -3,11 +3,11 @@ 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 @@ -15,5 +15,6 @@ dependencies: - sphinxcontrib-youtube==1.4.1 - sphinx-togglebutton==0.3.2 - sphinx-reredirects==0.1.4 + - kaleido diff --git a/lectures/BCG_complete_mkts.md b/lectures/BCG_complete_mkts.md index f5a44c3a..03163c21 100644 --- a/lectures/BCG_complete_mkts.md +++ b/lectures/BCG_complete_mkts.md @@ -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 ``` diff --git a/lectures/BCG_incomplete_mkts.md b/lectures/BCG_incomplete_mkts.md index 7c2445c1..c6a282bb 100644 --- a/lectures/BCG_incomplete_mkts.md +++ b/lectures/BCG_incomplete_mkts.md @@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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 ``` @@ -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 ``` diff --git a/lectures/_config.yml b/lectures/_config.yml index be53925a..cb5e87d1 100644 --- a/lectures/_config.yml +++ b/lectures/_config.yml @@ -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], @@ -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 diff --git a/lectures/_static/lecture_specific/amss2/recursive_allocation.py b/lectures/_static/lecture_specific/amss2/recursive_allocation.py index 3dd83501..f91f20c7 100644 --- a/lectures/_static/lecture_specific/amss2/recursive_allocation.py +++ b/lectures/_static/lecture_specific/amss2/recursive_allocation.py @@ -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:] diff --git a/lectures/knowing_forecasts_of_others.md b/lectures/knowing_forecasts_of_others.md index da6d1909..ae198ed9 100644 --- a/lectures/knowing_forecasts_of_others.md +++ b/lectures/knowing_forecasts_of_others.md @@ -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 ```