def METHOD_NAME(self):
    # Check that up=1.0 gives same answer as lfilter + slicing
    random_state = np.random.RandomState(17)
    try_types = (int, np.float32, np.complex64, float, complex)
    size = 10000
    down_factors = [2, 11, 79]
    for dtype in try_types:
        x = random_state.randn(size).astype(dtype)
        if dtype in (np.complex64, np.complex128):
            x += 1j * random_state.randn(size)
        for down in down_factors:
            h = firwin(31, 1. / down, window='hamming')
            yl = lfilter(h, 1.0, x)[::down]
            y = upfirdn(h, x, up=1, down=down)
            assert_allclose(yl, y[:yl.size], atol=1e-7, rtol=1e-7)