Skip to content

FIX: support phasespace v2.0 - #606

Merged
redeboer merged 4 commits into
mainfrom
support-phasespace-2
Nov 19, 2026
Merged

redeboer merged 4 commits into
mainfrom
support-phasespace-2

Conversation

@redeboer

@redeboer redeboer commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

This PR extracts the non-breaking part of #599 for a 0.4.18 patch release. The phsp extra still installs TensorFlow, and the class names keep their TF prefix.

🐛 Bug fixes

  • TFPhaseSpaceGenerator and TFWeightedPhaseSpaceGenerator work with phasespace 2.0. They now select the phasespace backend explicitly instead of relying on its default, which became NumPy in 2.0. With the default "tensorflow" backend, the generators produce exactly the same samples for the same seed as before.

⚙️ Enhancements

  • Both generators get a keyword-only backend argument that accepts "tensorflow" (default), "numpy", or "jax". The generators always return NumPy arrays. To support backend selection, the phsp extra now requires phasespace 1.11 or higher instead of 1.7.
  • The generators accept any RealNumberGenerator, instead of raising a TypeError for anything other than a TFUniformRealNumberGenerator. A generator that does not belong to the selected backend provides an integer seed, so samples stay reproducible.

📝 Documentation

  • The phase space page gets a section on backends that shows which extra each backend requires and how each one uses the given RealNumberGenerator, and links to the published reports TR-036 and TR-037 that benchmark the backends and the weight maximum estimate.

Squash commit messages

* DOC: show how to select the phase space backend
* ENH: accept any random number generator in phase space generators
* ENH: support selecting the phase space backend

@redeboer redeboer added this to the 0.4.18 milestone Nov 17, 2026
@redeboer redeboer added 🐛 Bug Something isn't working ⚙️ Enhancement Improvements and optimizations of existing features labels Nov 17, 2026
@redeboer redeboer self-assigned this Nov 17, 2026
redeboer

This comment was marked as resolved.

@redeboer
redeboer added this pull request to stack #607 November 17, 2026 22:09
@redeboer redeboer changed the title FIX: support phasespace 2.0 FIX: support phasespace v2.0 Nov 17, 2026
@redeboer
redeboer force-pushed the support-phasespace-2 branch from 27aea40 to 20851d7 Compare November 18, 2026 09:23
@redeboer
redeboer removed this pull request from stack #607 November 18, 2026 10:32
@redeboer
redeboer added this pull request to stack #610 November 18, 2026 10:33
@redeboer redeboer changed the title FIX: support phasespace v2.0 FIX: support phasespace v2.0 Nov 18, 2026
@redeboer redeboer added 📝 Docs Improvements or additions to documentation ⬆️ Lock This PR upgrades the lock files labels Nov 18, 2026
@redeboer redeboer removed the ⬆️ Lock This PR upgrades the lock files label Nov 19, 2026
@redeboer
redeboer force-pushed the support-phasespace-2 branch from ed79279 to 607668a Compare November 19, 2026 10:33
@redeboer
redeboer merged commit bdb66db into main Nov 19, 2026
32 checks passed
@redeboer
redeboer deleted the support-phasespace-2 branch November 19, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 Bug Something isn't working 📝 Docs Improvements or additions to documentation ⚙️ Enhancement Improvements and optimizations of existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support phasespace v2.0

1 participant