Skip to content

Commit 2d2e99f

Browse files
jstacclaude
andcommitted
Remove unnecessary global alpha variable
The α parameter is already defined with a default value (0.4) in the create_model function, so there's no need to set it as a global variable and pass it explicitly. Simplified: - model = create_model() instead of α = 0.4; model = create_model(α=α) - model_crra = create_model() in the CRRA exercise section Tested successfully with same results as before. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7212a13 commit 2d2e99f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lectures/cake_eating_egm_jax.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,7 @@ f_prime = lambda k, α: α * k**(α - 1)
164164
Now we create a model instance.
165165

166166
```{code-cell} python3
167-
α = 0.4
168-
169-
model = create_model(α=α)
167+
model = create_model()
170168
grid = model.grid
171169
```
172170

@@ -358,7 +356,7 @@ Now we solve for $\gamma = 1$ (log utility) and values approaching 1 from above.
358356
policies = {}
359357
endogenous_grids = {}
360358
361-
model_crra = create_model(α=α)
359+
model_crra = create_model()
362360
363361
for γ in γ_values:
364362
c_init = jnp.copy(model_crra.grid)

0 commit comments

Comments
 (0)