fix: accept xp kwarg in inline Gaussian.model_data_from for af.ex.Analysis parity#9
Merged
Merged
Conversation
…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>
Merged
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xp=nptomodel_data_fromon 7 inlineGaussianclasses across the dev workspace.xprather thannp.Why
Companion fix to
autofit_workspace's tutorial update for PyAutoFit#1240. These dev scripts use customAnalysisclasses that callmodel_data_fromdirectly, so they don't currently break under PyAutoFit#1240'sxpplumbing — but updating them keeps the dev-scriptGaussiandefinitions reusable withaf.ex.Analysisand consistent with the tutorial Gaussian.Files changed
searches_minimal/emcee_simple.pysearches_minimal/lbfgs_simple.pysearches_minimal/dynesty_simple.pysearches_minimal/nss_simple.pysearches_minimal/nautilus_simple.pysearches/ultranest/example.pysearches/pyswarms/example.pyRelated
Test plan
PYAUTO_TEST_MODE=1 python3 searches_minimal/nautilus_simple.pycompletes (33s, log_Z≈-67.18)🤖 Generated with Claude Code