Skip to content

Read integer polynomial profile coefficients as floats - #29

Merged
krystophny merged 1 commit into
developfrom
fix/integer-polynomial-coefs
Nov 7, 2026
Merged

krystophny merged 1 commit into
developfrom
fix/integer-polynomial-coefs

Conversation

@krystophny

Copy link
Copy Markdown
Member

profile_from_parameters scales the coefficient array in place. For integer coefficients, such as coefs = [1] from a VMEC input with AI = 1, and a float scale, NumPy raises UFuncTypeError: Cannot cast ufunc 'multiply' output from dtype('float64') to dtype('int64'). The polynomial branch now reads the coefficients as floats, as the B-spline and interpolation branches already do.

The new test test_polynomial_profile_with_integer_coefficients fails on develop and passes with the change.

Chris&AI

profile_from_parameters scaled the coefficient array in place, which fails for integer coefficients such as coefs = [1] with a float scale, as VMEC inputs with AI = 1 produce.
@krystophny
krystophny enabled auto-merge November 7, 2026 06:22
@krystophny
krystophny added this pull request to the merge queue Nov 7, 2026
Merged via the queue into develop with commit 0ebdbcb Nov 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant