Skip to content

TokaMaker: Fix SciPy 1.18 compatibility in eqdsk.py geometry tracing#12

Merged
hansec merged 1 commit into
scipy_1_18_fixfrom
copilot/analyze-scipy-update-failure
Jun 21, 2026
Merged

TokaMaker: Fix SciPy 1.18 compatibility in eqdsk.py geometry tracing#12
hansec merged 1 commit into
scipy_1_18_fixfrom
copilot/analyze-scipy-update-failure

Conversation

Copilot AI commented Jun 21, 2026

Copy link
Copy Markdown

Primary changes

SciPy 1.18 changed RectBivariateSpline.ev() to return a 1-d array (1,) instead of a 0-d array when called with scalar arguments. This breaks float() conversion in _trace_surfaces() at the magnetic axis point:

# Before (fails on SciPy >= 1.18)
Jt0 = float(Jt_interp.ev(Z0, R0))

# After (works on all versions)
Jt0 = float(Jt_interp.ev(Z0, R0).item())

This was the sole cause of the test_eqdsk_gfile failure on CI after the Ubuntu runner image update.

Secondary changes

None.

API changes

None.

Copilot AI requested a review from hansec June 21, 2026 14:42
@hansec hansec changed the base branch from main to scipy_1_18_fix June 21, 2026 14:56
@hansec hansec marked this pull request as ready for review June 21, 2026 14:57
@hansec hansec merged commit 5a17e6f into scipy_1_18_fix Jun 21, 2026
1 check passed
@hansec hansec deleted the copilot/analyze-scipy-update-failure branch June 21, 2026 14:57
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.

2 participants