'Test that the different modes are producing the correct results using
a 3x3 uniform kernel.'

@pytest.mark.parametrize(u'boundary', BOUNDARY_OPTIONS)
def test_uniform_3x3x3(self, boundary):

    x = np.array([[[1.0, 2.0, 1.0], [2.0, 3.0, 1.0], [3.0, 2.0, 5.0]], [[4.0, 3.0, 1.0], [5.0, 3.0, 2.0], [6.0, 1.0, 1.0]], [[7.0, 0.0, 2.0], [8.0, 2.0, 3.0], [9.0, 2.0, 2.0]]], dtype=u'>f8')
    y = np.ones((3, 3, 3), dtype=u'>f8')
    z = convolve(x, y, boundary=boundary, normalize_kernel=False)
    if (boundary is None):
        assert_array_almost_equal_nulp(z, np.array([[[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0], [0.0, 81.0, 0.0], [0.0, 0.0, 0.0]], [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]], dtype=u'>f8'), 10)
    elif (boundary == u'fill'):
        assert_array_almost_equal_nulp(z, np.array([[[23.0, 28.0, 16.0], [35.0, 46.0, 25.0], [25.0, 34.0, 18.0]], [[40.0, 50.0, 23.0], [63.0, 81.0, 36.0], [46.0, 60.0, 27.0]], [[32.0, 40.0, 16.0], [50.0, 61.0, 22.0], [36.0, 44.0, 16.0]]], dtype=u'>f8'), 10)
    elif (boundary == u'wrap'):
        assert_array_almost_equal_nulp(z, np.array([[[81.0, 81.0, 81.0], [81.0, 81.0, 81.0], [81.0, 81.0, 81.0]], [[81.0, 81.0, 81.0], [81.0, 81.0, 81.0], [81.0, 81.0, 81.0]], [[81.0, 81.0, 81.0], [81.0, 81.0, 81.0], [81.0, 81.0, 81.0]]], dtype=u'>f8'), 10)
    else:
        assert_array_almost_equal_nulp(z, np.array([[[65.0, 54.0, 43.0], [75.0, 66.0, 57.0], [85.0, 78.0, 71.0]], [[96.0, 71.0, 46.0], [108.0, 81.0, 54.0], [120.0, 91.0, 62.0]], [[127.0, 88.0, 49.0], [141.0, 96.0, 51.0], [155.0, 104.0, 53.0]]], dtype=u'>f8'), 10)
