Skip to content

Commit c70c368

Browse files
jstacclaude
andcommitted
Fix cake eating lectures: inline external code and remove Numba decorators
This commit fixes issues with the cake eating lecture series that prevented them from executing correctly after the conversion to NamedTuple with type hints. Changes made: 1. Inlined external code files into lectures: - Replaced :load: directives with actual code from analytical.py files - Inlined solve_model function from optgrowth/solve_model.py - Deleted now-unused external files 2. Fixed Numba incompatibility: - Removed @jit decorators from cake_eating_time_iter.md and cake_eating_egm.md - Switched from quantecon.optimize.brentq to scipy.optimize.brentq - Removed numba imports where no longer needed 3. Fixed function signatures: - Corrected parameter order in state_action_value() in cake_eating_stochastic.md - Removed [0] indexing from scipy's brentq (returns scalar, not tuple) 4. Added Python files for testing: - Generated .py files using jupytext for all cake eating lectures - Verified all lectures execute successfully without errors All five cake eating lectures now execute correctly as standalone Python scripts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ca8278a commit c70c368

File tree

13 files changed

+3227
-70
lines changed

13 files changed

+3227
-70
lines changed

lectures/_static/lecture_specific/cake_eating_numerical/analytical.py

Lines changed: 0 additions & 9 deletions
This file was deleted.

lectures/_static/lecture_specific/optgrowth/cd_analytical.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

lectures/_static/lecture_specific/optgrowth/solve_model.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)