Filter a data sequence, x, using a digital filter. This works for many
fundamental data types (including Object type). The filter is a direct
form II transposed implementation of the standard difference equation
(see Notes).

Parameters :

b : array_like

The numerator coefficient vector in a 1-D sequence.

a : array_like

The denominator coefficient vector in a 1-D sequence. If a[0]
is not 1, then both a and b are normalized by a[0].

x : array_like

An N-dimensional input array.

axis : int

The axis of the input data array along which to apply the
linear filter. The filter is applied to each subarray along
this axis (Default = -1)

zi : array_like (optional)

Initial conditions for the filter delays. It is a vector
(or array of vectors for an N-dimensional input) of length
max(len(a),len(b))-1. If zi=None or is not given then initial
rest is assumed. SEE signal.lfiltic for more information.

Returns :

y : array

The output of the digital filter.

zf : array (optional)

If zi is None, this is not returned, otherwise, zf holds the
final filter delay values.

Notes

The filter function is implemented as a direct II transposed structure.
This means that the filter implements