Commit 4eac159
Refactor f and f_prime to use explicit alpha parameter
Changed from closure-based approach to explicit parameter passing:
- f = lambda k, α: k**α (instead of f = lambda k: k**α with global α)
- f_prime = lambda k, α: α * k**(α - 1)
- Updated K operator to call f(s, α) and f_prime(s, α)
This makes the NumPy version consistent with the JAX implementation and
ensures the α stored in the Model is actually used in the K operator
(previously it was unpacked but unused).
Benefits:
- Consistency between NumPy and JAX versions
- Clearer function dependencies (α is an explicit parameter)
- Actually uses model.α instead of relying on closure
Tested successfully with same convergence behavior.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 1ca20dd commit 4eac159
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | 269 | | |
271 | 270 | | |
272 | 271 | | |
273 | | - | |
274 | | - | |
| 272 | + | |
| 273 | + | |
275 | 274 | | |
276 | 275 | | |
277 | 276 | | |
| |||
0 commit comments