Skip to content

fix: accept xp kwarg in inline Gaussian.model_data_from for af.ex.Analysis parity#9

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/nautilus-jax-example
Apr 30, 2026
Merged

fix: accept xp kwarg in inline Gaussian.model_data_from for af.ex.Analysis parity#9
Jammy2211 merged 1 commit into
mainfrom
feature/nautilus-jax-example

Conversation

@Jammy2211

Copy link
Copy Markdown
Owner

Summary

  • Adds xp=np to model_data_from on 7 inline Gaussian classes across the dev workspace.
  • Routes their math through xp rather than np.

Why

Companion fix to autofit_workspace's tutorial update for PyAutoFit#1240. These dev scripts use custom Analysis classes that call model_data_from directly, so they don't currently break under PyAutoFit#1240's xp plumbing — but updating them keeps the dev-script Gaussian definitions reusable with af.ex.Analysis and consistent with the tutorial Gaussian.

Files changed

  • searches_minimal/emcee_simple.py
  • searches_minimal/lbfgs_simple.py
  • searches_minimal/dynesty_simple.py
  • searches_minimal/nss_simple.py
  • searches_minimal/nautilus_simple.py
  • searches/ultranest/example.py
  • searches/pyswarms/example.py

Related

Test plan

  • PYAUTO_TEST_MODE=1 python3 searches_minimal/nautilus_simple.py completes (33s, log_Z≈-67.18)
  • Other six scripts: same pattern, identical body diff

🤖 Generated with Claude Code

…lysis parity

These dev scripts use custom Analysis classes that call `model_data_from`
directly, so they don't currently break with PyAutoFit#1240's xp plumbing.
Update them anyway for consistency with autofit_workspace tutorials and
to keep the dev-script Gaussian definitions reusable under `af.ex.Analysis`.

Affects 7 inline Gaussian classes:
- searches_minimal/{emcee,lbfgs,dynesty,nss,nautilus}_simple.py
- searches/ultranest/example.py
- searches/pyswarms/example.py

Each `model_data_from(self, xvalues)` now accepts `xp=np` and routes
its math through `xp`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit e3d8e26 into main Apr 30, 2026
@Jammy2211
Jammy2211 deleted the feature/nautilus-jax-example branch April 30, 2026 14:13
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