Based on the description of both functions, filter(b, a, x) matlab function and lfilter(b, a, x, axis=-1, z_i=None) scipy.signal should give the same result.
I take this example where the results are completely different:
import numpy as np
from scipy.signal import lfilter
bb = np.arange(0, 100, 1)
aa = 1
xx = np.tile(0.9, (100, 1))
yy = lfilter(b=bb, a=aa, x=xx)
print(yy[:10])
array([[0.],
[0.],
[0.],
[0.],
[0.],
[0.],
[0.],
[0.],
[0.],
[0.]])
print(yy.shape)
(100, 1)
# Same example on Matlab using filter
bb = 0:1:99
aa = 1
xx =repmat(0.9, 100, 1)
dd = filter(bb, aa, xx)
dd(1:10)
ans =
0
0.9000
2.7000
5.4000
9.0000
13.5000
18.9000
25.2000
32.4000
40.5000
print(size(dd)) # (100 ,1)