diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 7809c2a97..048041084 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/.github/workflows/ci.yml b/.github/workflows/ci.yml index f418e0b10..55cdc9124 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,13 +43,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 Download Notebooks (sphinx-tojupyter) shell: bash -l {0} diff --git a/environment.yml b/environment.yml index adb1b2856..58b7cc019 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.15.0 + - jupyter-book>=1.0.4post1,<2.0 + - quantecon-book-theme==0.15.1 - sphinx-tojupyter==0.4.0 - sphinxext-rediraffe==0.2.7 - sphinx-exercise==1.2.0 diff --git a/lectures/newton_method.md b/lectures/newton_method.md index 54194ca80..1966b06f3 100644 --- a/lectures/newton_method.md +++ b/lectures/newton_method.md @@ -1074,22 +1074,21 @@ Let's run through each initial guess and check the output ```{code-cell} ipython3 :tags: [raises-exception] -attempt = 1 -for init in initLs: +for attempt, init in enumerate(initLs, start=1): print(f"Attempt {attempt}: Starting value is {init} \n") %time p = newton(lambda p: e(p, A, b, c), init, tol=1e-15, max_iter=15) print("-" * 64) - attempt += 1 ``` We can see that Newton's method may fail for some starting values. Sometimes it may take a few initial guesses to achieve convergence. -Substitute the result back to the formula to check our result +Substitute the result back to the formula to check our result using the second initial guess which converges ```{code-cell} ipython3 -e(p, A, b, c) +p_solution = newton(lambda p: e(p, A, b, c), initLs[1], tol=1e-15, max_iter=15) +e(p_solution, A, b, c) ``` We can see the result is very accurate.