bundles / scipy latest / scipy / signal / _signaltools / lfiltic
function
scipy.signal._signaltools:lfiltic
Signature
def lfiltic ( b , a , y , x = None ) Summary
Construct initial conditions for lfilter given input and output vectors.
Extended Summary
Given a linear filter (b, a) and initial conditions on the output y and the input x, return the initial conditions on the state vector zi which is used by lfilter to generate the output given the input.
Parameters
b: array_likeLinear filter term.
a: array_likeLinear filter term.
y: array_likeInitial conditions.
If
N = len(a) - 1, theny = {y[-1], y[-2], ..., y[-N]}.If
yis too short, it is padded with zeros.x: array_like, optionalInitial conditions.
If
M = len(b) - 1, thenx = {x[-1], x[-2], ..., x[-M]}.If
xis not given, its initial conditions are assumed zero.If
xis too short, it is padded with zeros.
Returns
zi: ndarrayThe state vector
zi = {z_0[-1], z_1[-1], ..., z_K-1[-1]}, whereK = max(M, N).
Notes
Array API Standard Support
lfiltic has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.
==================== ==================== ==================== Library CPU GPU ==================== ==================== ==================== NumPy ✅ n/a CuPy n/a ✅ PyTorch ✅ ⛔ JAX ✅ ⛔ Dask ⚠️ computes graph n/a ==================== ==================== ====================
See
dev-arrayapifor more information.
See also
Aliases
-
scipy.signal.lfiltic