io#
import ampform.io
Input-output functions for ampform
and sympy
objects.
Tip
This function are registered with functools.singledispatch()
and can be
extended as follows:
>>> from ampform.io import aslatex
>>> @aslatex.register(int)
... def _(obj: int) -> str:
... return "my custom rendering"
>>> aslatex(1)
'my custom rendering'
>>> aslatex(3.4 - 2j)
'3.4-2i'