lcapy.utils

This module provides common utility functions.

Copyright 2021–2022 Michael Hayes, UCECE

Functions

as_N_D(expr, var[, monic_denominator, use_sympy])

as_sum(expr, var)

as_sum_terms(expr, var)

expand_functions(expr, var)

factor_const(expr, var)

Extract constant factor from expression and return tuple of constant and the rest of the expression.

factor_expr(expr, factor)

Extract factor from expression or None if expression does not have factor.

isiterable(arg)

merge_common(lists)

remove_images(expr, var, dt[, m1, m2])

scale_shift(expr, var)

separate_dirac_delta(expr)

Separate Dirac delta terms from expression.

similarity_shift(expr, var)

Rewrite foo(a * t + b) as foo(t) and return a, b.

split_dirac_delta(expr)

Return expression as a list of terms.

term_const(expr, var)

Extract constant term from expression and return tuple of constant and the rest of the expression.