TensorReductionError
symbolica.community.hepkit Class
TensorReductionError()Failure while parsing or reducing a Lorentz tensor.
Examples
from symbolica import S, E
from symbolica.community import hepkit as hep
from symbolica.community.tensor import Representation, TensorName
D, mu = S("D", "mu")
k = TensorName.vector("tensor_reduction_error_example::k")
reducer = hep.TensorReducer(D)
try:
reducer.reduce(k(Representation.mink(D)(mu)))
except hep.TensorReductionError as error:
assert "no integrated vectors selected" in str(error)
else:
raise AssertionError("expected a missing-selector error")View generated signature source: docs/api/python/feynkit-community.pyi:11339