Commit 2116d5c
[Repo Assist] fix(utils): capture loop variable in create_polynomial_function via default arg (#1763)
fix: capture loop variable in create_polynomial_function via default arg
The inner function poly_term captured the loop variable 'degree' by
reference, so every function in the returned list evaluated to
x^max_degree regardless of its index. Fix by binding each value via
a default argument (_degree=degree).
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 032dc17 commit 2116d5c
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
0 commit comments