Skip to content

TensorWaves 0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 19 Nov 15:49
Immutable release. Only release title and notes can be modified.
e9175a4

See all documentation for this version here.

Note

TensorWaves 0.5.0 drops TensorFlow as the default phase space backend. The TF-prefixed phase space generators are renamed, the phsp and pwa extras no longer install TensorFlow, and backend="tf" is no longer accepted. Phase space samples are now generated with NumPy, so a fixed seed gives different samples than before.

Rename the generators and the backend name in your code:

from tensorwaves.data import PhaseSpaceGenerator, UniformRNG, WeightedPhaseSpaceGenerator

phsp_generator = PhaseSpaceGenerator(initial_state_mass, final_state_masses)
function = create_parametrized_function(expression, parameters, backend="tensorflow")

To reproduce samples from earlier versions, install the tf extra and select the TensorFlow backend for both the generator and the random number generator:

pip install "tensorwaves[phsp,tf]"
phsp_generator = PhaseSpaceGenerator(initial_state_mass, final_state_masses, backend="tensorflow")
rng = UniformRNG(seed=0, backend="tensorflow")

⚠️ Enhancements and optimizations

  • Python 3.14 and 3.15 are now supported, with NumPy, JAX, and Numba backends (#599)

⚠️ API changes

  • TFPhaseSpaceGenerator and TFWeightedPhaseSpaceGenerator renamed to PhaseSpaceGenerator and WeightedPhaseSpaceGenerator; the phsp and pwa extras no longer install TensorFlow (#599)
  • The backend="tf" alias is removed in favor of backend="tensorflow" (#611)

⚠️ Changes that may affect behavior

  • Phase space samples are now generated with NumPy by default, so samples for a given seed differ; use backend="tensorflow" to reproduce them (#599)

📝 Documentation

  • Examples now use backend-neutral phase space names, and the installation page lists the extras each backend needs (#599)

🖱️ Developer Experience

  • New tensorflow pytest marker skips TensorFlow tests when TensorFlow is not installed (#599)

The full changelog as commits can be found here.