Skip to content

Add plain SciPy wrapper factory - #78

Draft
jonathanberthias wants to merge 4 commits into
migration/distribution-corefrom
migration/scipy-wrapper-factory
Draft

jonathanberthias wants to merge 4 commits into
migration/distribution-corefrom
migration/scipy-wrapper-factory

Conversation

@jonathanberthias

@jonathanberthias jonathanberthias commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

The explicit-state path began with a handwritten Normal example. Repeating its constructor, parameter resolution, and evaluation code for each plain SciPy law would make the catalog hard to maintain. Keeping the SciPy implementation in distributions/core.py would also make every future backend depend on SciPy.

This PR adds a factory for opt-in continuous wrappers that expose SciPy's native shape names. It moves the concrete SciPy implementation and its parameter defaults to distributions/scipy_adapter.py, leaving backend-independent contracts in distributions/core.py. Normal uses the factory, while Gamma and Genextreme demonstrate required shape parameters.

Generated constructors have useful runtime signatures but looser static typing. The concrete adapter remains available as a precisely typed construction path until the public API cutover.

@jonathanberthias
jonathanberthias force-pushed the migration/scipy-wrapper-factory branch from 870d95c to edd5aec Compare September 26, 2026 14:25
@jonathanberthias
jonathanberthias force-pushed the migration/scipy-wrapper-factory branch from edd5aec to 015a90d Compare September 26, 2026 19:15
@jonathanberthias
jonathanberthias added this pull request to stack #84 September 26, 2026 19:15
@jonathanberthias
jonathanberthias force-pushed the migration/scipy-wrapper-factory branch from 015a90d to 5072864 Compare September 26, 2026 19:28
@jonathanberthias
jonathanberthias force-pushed the migration/scipy-wrapper-factory branch 3 times, most recently from db45112 to 41d603f Compare September 26, 2026 19:52
@jonathanberthias
jonathanberthias force-pushed the migration/scipy-wrapper-factory branch 4 times, most recently from f59b761 to 44214eb Compare September 27, 2026 13:50
@jonathanberthias
jonathanberthias force-pushed the migration/scipy-wrapper-factory branch from c966e8b to 638158d Compare October 2, 2026 22:25
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