def miso_lfilter_old(ar, ma, x, useic=False):
 ma = np.asarray(ma)
 ar = np.asarray(ar)
 inp2 = signal.convolve(x, ma[:, ::(-1)])[:, ((x.shape[1] + 1) // 2)]
 inp = signal.correlate(x, ma[::(-1), :])[:, ((x.shape[1] + 1) // 2)]
 assert_almost_equal(inp2, inp)
 nobs = x.shape[0]
 if useic:
  return (signal.lfilter([1], ar, inp, zi=signal.lfiltic(np.array([1.0, 0.0]), ar, useic))[0][:nobs], inp[:nobs])
 else:
  return (signal.lfilter([1], ar, inp)[:nobs], inp[:nobs])

def miso_lfilter_old ( ar , ma , x , useic = False ) : ma = np . asarray ( ma ) ar = np . asarray ( ar ) inp2 = signal . convolve ( x , ma [ : , : : ( - 1 ) ] ) [ : , ( ( x . shape [ 1 ] + 1 ) // 2 ) ] inp = signal . correlate ( x , ma [ : : ( - 1 ) , : ] ) [ : , ( ( x . shape [ 1 ] + 1 ) // 2 ) ] assert_almost_equal ( inp2 , inp ) nobs = x . shape [ 0 ] if useic : return ( signal . lfilter ( [ 1 ] , ar , inp , zi = signal . lfiltic ( np . array ( [ 1.0 , 0.0 ] ) , ar , useic ) ) [ 0 ] [ : nobs ] , inp [ : nobs ] ) else : return ( signal . lfilter ( [ 1 ] , ar , inp ) [ : nobs ] , inp [ : nobs ] )
use nd convolution to merge inputs .