Tensorwaves

Latest version: v0.4.13

Safety actively analyzes 723144 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 7

0.4.6

_See all documentation for this version [here](//tensorwaves.rtfd.io/en/0.4.6)._

⚠️ Interface

- Dropped Python 3.6 support (431)
- Version limit on [`phasespace`](https://github.com/zfit/phasespace) has been removed (#445).
**If TensorWaves is installed with `phasespace`, TensorFlow is limited to below v2.7.**


🖱️ Developer Experience

- Documentation is now built with [`sphinx-build`](https://www.sphinx-doc.org/en/master/man/sphinx-build.html) only and cannot be built with `make` anymore (#433)
- Documentation in `EXECUTE_NB` mode is now faster on second run due to MyST-NB caching (433)

0.4.5

_See all documentation for this version [here](//tensorwaves.rtfd.io/en/0.4.5)._

🐛 Bug fixes

- Expressions that contain [`sympy.Indexed`](https://docs.sympy.org/latest/modules/tensor/indexed.html#sympy.tensor.indexed.Indexed) can now be lambdified (427)

🔨 Internal maintenance

- TensorWaves can now be installed with any version of AmpForm above [v0.13.0](https://github.com/ComPWA/ampform/releases/tag/0.13.0) (#426)

📝 Documentation

- Extended API docstrings in the `function` module (428)

🖱️ Developer Experience

- All dependencies are now also [pinned](https://compwa-org.readthedocs.io/develop.html#pinning-dependency-versions) on Read the Docs (429)

0.4.4

_See all documentation for this version [here](https://tensorwaves.rtfd.io/en/0.4.4)._

🐛 Bug fixes

- Default weights in [`ChiSquared`](https://tensorwaves.readthedocs.io/en/0.4.4/api/tensorwaves.estimator.html#tensorwaves.estimator.ChiSquared) are now computed from `observed_values` (421)</summary>

🔨 Internal maintenance

- TensorWaves can now be installed with [AmpForm v0.14.x](https://github.com/ComPWA/ampform/releases/tag/0.14.0) (#424)

📝 Documentation

- Switched to [Chew-Mandelstam _S_-wave phase space factor](https://ampform.readthedocs.io/en/0.14.0/api/ampform.dynamics.phasespace.html#ampform.dynamics.phasespace.PhaseSpaceFactorSWave) in the [analytic continuation notebook](https://tensorwaves.readthedocs.io/en/0.4.4/amplitude-analysis/analytic-continuation.html) (#425)

0.4.3

_See all documentation for this version [here](https://tensorwaves.rtfd.io/en/0.4.3)._

🔨 Internal maintenance

* TensorWaves can now be installed with AmpForm v0.13.x (419)

0.4.2

_See all documentation for this version [here](https://tensorwaves.rtfd.io/en/0.4.2)._

💡 New features

* Added minuit_modifier constructor argument (399)

🐛 Bug fixes

* Speed-up prepare_caching() with sympy.Basic.xreplace (403)

🔨 Internal maintenance

<details>
<summary>Added support for AmpForm v0.12.3 (406)</summary>

AmpForm [v0.12.3](https://github.com/ComPWA/ampform/releases/tag/0.12.3) introduces a small change through https://github.com/ComPWA/ampform/pull/211: `BoostZ` etc becomes `BoostZMatrix`. This needs to be fixed in the TensorFlow printer.

</details>

<details>
<summary>Added support for AmpForm v0.12.4 (417)</summary>

Added TensorFlow printer instructions for `_BoostZMatrixImplementation` etc. See release notes [AmpForm v0.12.4](https://github.com/ComPWA/ampform/releases/tag/0.12.4).

</details>

<details>
<summary>Switched to new import attrs API (414)</summary>

See [`import attrs`](https://hynek.me/articles/import-attrs/#the-last-step-import-attrs) and [`attrs` TNG](https://www.attrs.org/en/21.4.0/names.html#attrs-tng).

</details>

📝 Documentation

<details>
<summary>Added notebook button for Deepnote (400)</summary>

Closes https://github.com/ComPWA/repo-maintenance/issues/43

[![image](https://user-images.githubusercontent.com/29308176/149676020-8281cbb4-8cae-4e1a-a171-b451809ea993.png)](https://tensorwaves--400.org.readthedocs.build/en/400/usage.html)

</details>

<details>
<summary>Usage notebooks now show how to get a Hesse from FitResult.specifics (401)</summary>

Also fixes a small bug: callbacks that write to disk skip writing when computing the Hesse.

Preview [here](https://tensorwaves--401.org.readthedocs.build/en/401/usage/basics.html#minuit2).

</details>

<details>
<summary>Improved docstrings of prepare_caching() and create_cached_function() (403)</summary>

Improved the docstrings of both functions, preview [here](https://tensorwaves--403.org.readthedocs.build/en/403/api/tensorwaves.estimator.html#tensorwaves.estimator.create_cached_function).

</details>

<details>
<summary>Code examples now automatically to APIs as if it's an IDE (405)</summary>

- All code examples are now clickable with links to corresponding reference documentation (also external links APIs) with [`sphinx-codeautolink`](https://sphinx-codeautolink.readthedocs.io). Closes https://github.com/ComPWA/compwa-org/issues/106 [![image](https://user-images.githubusercontent.com/29308176/151720171-5627f6dc-fef7-4471-88c8-366e61680988.png)](https://tensorwaves--405.org.readthedocs.build/en/405/usage.html#generate-and-transform-data)
- Installed [`jupyterlab-myst`](https://github.com/executablebooks/jupyterlab-myst)
- Updated to the first non-beta black release [22.1.0](https://github.com/psf/black/releases/tag/22.1.0). Most important style effect: [no space around power operator `**`](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-breaks-binary-operators).

</details>

<details>
<summary>Second level in left sidebar is unfolded by default (407)</summary>

Links to `graphviz`'s API are now also embedded correctly. Follow-up to 405.

</details>

<details>
<summary>Added Hypothesis and utterances overlay (409)</summary>

Closes https://github.com/ComPWA/compwa-org/issues/109

Preview [here](https://tensorwaves--409.org.readthedocs.build/en/409).

</details>

<details>
<summary>Explained how to pin dependencies with Conda (411)</summary>

Rewrote the installation page a bit so that it's clearer how to pin all dependencies with Conda. Preview [here](https://tensorwaves--411.org.readthedocs.build/en/411/install.html).

</details>

<details>
<summary>Illustrated how to use create_cached_function() in PWA notebook (412)</summary>

Added an example of how to use [`create_cached_function()`](https://tensorwaves--412.org.readthedocs.build/en/412/api/tensorwaves.estimator.html#tensorwaves.estimator.create_cached_function) in combination with an [`Estimator`](https://tensorwaves--412.org.readthedocs.build/en/412/api/tensorwaves.estimator.html#tensorwaves.estimator.Estimator). Preview [here](https://tensorwaves--412.org.readthedocs.build/en/412/amplitude-analysis.html#simplified-procedure-create-cached-function).

</details>

<details>
<summary>Added instructions how to install from Git repository with optional dependencies (413)</summary>

Added an additional install example that shows how to install a specific branch or tag with `pip` from Git _with optional dependencies_. Preview [here](https://tensorwaves--413.org.readthedocs.build/en/413/install.html#quick-installation).

</details>

🖱️ Developer Experience

<details>
<summary>Change upgrade cron job to bi-weekly (398 and 408)</summary>

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

</details>

<details>
<summary>Add notebook button for Deepnote (400)</summary>

Closes https://github.com/ComPWA/repo-maintenance/issues/43

[![image](https://user-images.githubusercontent.com/29308176/149676020-8281cbb4-8cae-4e1a-a171-b451809ea993.png)](https://tensorwaves--400.org.readthedocs.build/en/400/usage.html)

</details>

<details>
<summary>Type aliases in API are now abbreviated (404)</summary>

See https://github.com/ComPWA/ampform/pull/207

Compare API [v0.4.1](https://tensorwaves.rtfd.io/en/0.4.1/api/tensorwaves.interface.html) and [preview of this PR](https://tensorwaves--404.org.readthedocs.build/en/404/api/tensorwaves.interface.html).

</details>

<details>
<summary>Installed jupyterlab-myst (405)</summary>

See [`jupyterlab-myst`](https://github.com/executablebooks/jupyterlab-myst)

</details>

<details>
<summary>Tests can now be run with specific versions of dependencies (410 and 416)</summary>

Adds a [`workflow_dispatch` with inputs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_dispatchinputs) that allows running all tests manually with the latest version of AmpForm installed.

[![image](https://user-images.githubusercontent.com/29308176/152698999-b9df746d-8931-4398-bede-8c07ea80c11b.png)](https://github.com/ComPWA/tensorwaves/actions/workflows/ci-tests.yml)

[![image](https://user-images.githubusercontent.com/29308176/155362608-11bc9605-2e57-4e04-9cd5-f85ed93bd58b.png)](https://github.com/ComPWA/tensorwaves/actions/workflows/ci-tests.yml)

</details>

0.4.1

_See all documentation for this version [here](https://tensorwaves.rtfd.io/en/0.4.1)._

💡 New features

<details>
<summary>Implemented create_cached_function() (397)</summary>

Closes 358

Expression tree optimizations sketched [here](https://tensorwaves.readthedocs.io/en/0.4.0/amplitude-analysis.html#prepare-parametrized-function) have been bundled in a new function [`create_cached_function()`](https://tensorwaves--397.org.readthedocs.build/en/397/api/tensorwaves.estimator.html#tensorwaves.estimator.create_cached_function). A usage notebook can be previewed [here](https://tensorwaves--397.org.readthedocs.build/en/397/usage/caching.html).

</details>


⚠️ Interface

<details>
<summary>TensorFlow has become an optional dependency (394)</summary>

All computational backends are now optional dependencies (apart from NumPy). So for instance, to install TensorWaves with JAX, run:
shell
pip install tensorwaves[jax]

To do amplitude analysis, install with:
shell
pip install tensorwaves[jax,pwa]


</details>


🐛 Bug fixes

<details>
<summary>Progress bar of domain generator is hidden in IntensityDistributionGenerator (396)</summary>

Closes 395

python
import ampform
import qrules
from ampform.dynamics.builder import create_relativistic_breit_wigner_with_ff
from tensorwaves.data import (
IntensityDistributionGenerator,
TFPhaseSpaceGenerator,
TFUniformRealNumberGenerator,
)
from tensorwaves.data.transform import SympyDataTransformer
from tensorwaves.function.sympy import create_parametrized_function

reaction = qrules.generate_transitions(
initial_state="J/psi(1S)",
final_state=["gamma", "pi0", "pi0"],
allowed_intermediate_particles=["f(0)"],
allowed_interaction_types=["strong", "EM"],
)

builder = ampform.get_builder(reaction)
resonances = reaction.get_intermediate_particles()
for p in resonances:
builder.set_dynamics(p.name, create_relativistic_breit_wigner_with_ff)
model = builder.formulate()

intensity = create_parametrized_function(
model.expression.doit(),
parameters=model.parameter_defaults,
backend="jax",
)
helicity_transformer = SympyDataTransformer.from_sympy(
model.kinematic_variables, backend="jax"
)

phsp_generator = TFPhaseSpaceGenerator(
initial_state_mass=reaction.initial_state[-1].mass,
final_state_masses={i: p.mass for i, p in reaction.final_state.items()},
)
data_generator = IntensityDistributionGenerator(
function=intensity,
domain_generator=phsp_generator,
domain_transformer=helicity_transformer,
)
rng = TFUniformRealNumberGenerator(seed=0)
phsp_momenta = phsp_generator.generate(1_000_000, rng)
data_momenta = data_generator.generate(100_000, rng)

![image](https://user-images.githubusercontent.com/29308176/148271814-2c0c19c6-949f-4d58-b2b0-3fd2d7b84337.png)


</details>


🖱️ Developer Experience

<details>
<summary>Increased test coverage (393)</summary>

- Wrote some additional tests for the `tensorwaves.function` module
- [`TYPE_CHECKING`](https://docs.python.org/3/library/typing.html#typing.TYPE_CHECKING) is now [ignored](https://coverage.readthedocs.io/en/latest/excluding.html#excluding-code-from-coverage-py) in test coverage

</details>

Page 3 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.