def test_filtfilt():
 x = np.r_[(1, np.zeros(100))]
 y = filtfilt([1, 0], [1, 0], x, padlen=0)
 assert_array_equal(x, y)
 y = mne_sosfiltfilt(np.array([[1.0, 0.0, 0.0, 1, 0.0, 0.0]]), x, padlen=0)
 assert_array_equal(x, y)

def test_filtfilt ( ) : x = np . r_ [ ( 1 , np . zeros ( 100 ) ) ] y = filtfilt ( [ 1 , 0 ] , [ 1 , 0 ] , x , padlen = 0 ) assert_array_equal ( x , y ) y = mne_sosfiltfilt ( np . array ( [ [ 1.0 , 0.0 , 0.0 , 1 , 0.0 , 0.0 ] ] ) , x , padlen = 0 ) assert_array_equal ( x , y )
test sos filtfilt replacement .