capytaine.tools.symbolic_multiplication module

This module is used for the handling of zero and infinite frequencies. In this cases, the magnitudes that the solver has to manipulate are in the form of ω times a non-zero term. Instead of evaluating this multiplication as zero of infinity, we keep it symbolic using the class defined here.

The frequency can be provided to the solver as something like SymbolicMultiplication(“0”, 1.0) (that is zero) and the solver will return an output of the form SymbolicMultiplication(“0”, np.array(…)) (that is also actually zero, except we may be intested in the non-zero array).

class capytaine.tools.symbolic_multiplication.SymbolicMultiplication(symbol, value=1.0)[source]

Bases: object

reshape(*args)[source]
capytaine.tools.symbolic_multiplication.supporting_symbolic_multiplication(f)[source]

When this decorator is applied to a function, this function can now take as input a SymbolicMultiplication object. The function is applied on the value part of the SymbolicMultiplication without modifying the symbol.