io#
import ampform_dpd.io
Input-output functions for ampform
and sympy
objects.
This module extends AmpForm’s aslatex()
function. You can register
more implementations as follows:
This code originates from ComPWA/ampform#280.
- as_markdown_table(obj: Sequence) str [source]#
Render objects a
str
suitable for generating a table.
- perform_cached_lambdify(expr: Expr, backend: str = 'jax', directory: str | None = None) PositionalArgumentFunction [source]#
- perform_cached_lambdify(expr: Expr, parameters: Mapping[Symbol, ParameterValue], backend: str = 'jax', directory: str | None = None) ParametrizedBackendFunction
Lambdify a SymPy
Expr
and cache the result to disk.The cached result is fetched from disk if the hash of the expression is the same as the hash embedded in the filename.
- Parameters:
expr – A
sympy.Expr
on which to callcreate_function()
orcreate_parametrized_function()
.parameters – Specify this argument in order to create a
ParametrizedBackendFunction
instead of aPositionalArgumentFunction
.backend – The choice of backend for the created numerical function. WARNING: this function has only been tested for
backend="jax"
!directory – The directory in which to cache the result. If
None
, the cache directory will be put under the home directory, or to the path specified by the environment variableSYMPY_CACHE_DIR
.
See also
Submodules and Subpackages
- serialization
- amplitude
- decay
- dynamics
- format
ModelDefinition
Distribution
DecayDescription
Topology
DecayChain
Propagator
Vertex
HelicityVertex
ParityVertex
LSVertex
Node
KinematicsDefinition
StateDefinition
FunctionDefinition
BlattWeisskopfDefinition
BreitWignerDefinition
MultichannelBreitWignerDefinition
ChannelParameters
get_decay_chains()
get_distribution_def()
get_function_definition()
get_reference_topology()