Skip to content

Guard Coils.dofs_currents against None/bool sentinels (fixes tracing crash on #42)#43

Merged
eduardolneto merged 1 commit into
uwplasma:en/review_eg/examples_fixfrom
Tejas7007:guard-dofs-currents-for-42
Jul 15, 2026
Merged

Guard Coils.dofs_currents against None/bool sentinels (fixes tracing crash on #42)#43
eduardolneto merged 1 commit into
uwplasma:en/review_eg/examples_fixfrom
Tejas7007:guard-dofs-currents-for-42

Conversation

@Tejas7007

Copy link
Copy Markdown

Small guard for the None is not a valid value for jnp.array crash that #42 still hits during tracing. Coils.dofs_currents now passes a sentinel leaf (None / bool from eqx.partition) straight through instead of doing jnp.array(None) / currents_scale.

Verified on this branch (en/review_eg/examples_fix): from_simsopt + eqx.partition works, and trace_particles_coils_guidingcenter.py runs clean.

…Tree traversal, fixing 'None is not a valid value for jnp.array' crash in tracing (from_simsopt and from_json paths)
@eduardolneto

Copy link
Copy Markdown
Contributor

I will merge this as this does not create any conflict.

@eduardolneto
eduardolneto merged commit f642c13 into uwplasma:en/review_eg/examples_fix Jul 15, 2026
@eduardolneto eduardolneto mentioned this pull request Jul 15, 2026
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