def test_windowiterator_lbp_no_padding():
    n_cases = 5
    image_width = np.random.randint(50, 250, [n_cases, 1])
    image_height = np.random.randint(50, 250, [n_cases, 1])
    window_step_horizontal = np.random.randint(1, 10, [n_cases, 1])
    window_step_vertical = np.random.randint(1, 10, [n_cases, 1])
    radius = np.random.randint(3, 5, [n_cases, 1])
    for i in range(n_cases):
        image = Image(np.random.randn(1, image_height[i, 0],
                                      image_width[i, 0]))
        lbp_img = lbp(image, radius=radius[i, 0], samples=8,
                      window_step_vertical=window_step_vertical[i, 0],
                      window_step_horizontal=window_step_horizontal[i, 0],
                      window_step_unit='pixels', padding=False)
        window_size = 2 * radius[i, 0] + 1
        n_windows_horizontal = len(range(window_size - 1, image_width[i, 0],
                                         window_step_horizontal[i, 0]))
        n_windows_vertical = len(range(window_size - 1, image_height[i, 0],
                                       window_step_vertical[i, 0]))
        assert_allclose(lbp_img.shape, (n_windows_vertical,
                                        n_windows_horizontal))
dataset/ETHPy150Open menpo/menpo/menpo/feature/test/test_features.py/test_windowiterator_lbp_no_padding/original