x = np.array([0.5, 2.2, -1.8, -0.1])
h = np.array([1.0, 0.5])
y = signal.convolve(x, h)
xRecovered, xRemainder = signal.deconvolve(y, h)
assert np.allclose(xRecovered, x)
assert np.allclose(xRemainder, 0)
Inverse filtering using Python