'Test that the different modes are producing the correct results using
a uniform kernel with three elements. This version includes a NaN
value in the original array.'

@pytest.mark.parametrize((u'boundary', u'nan_treatment', u'normalize_kernel', u'preserve_nan'), itertools.product(BOUNDARY_OPTIONS, NANHANDLING_OPTIONS, NORMALIZE_OPTIONS, PRESERVE_NAN_OPTIONS))
def test_uniform_3_withnan(self, boundary, nan_treatment, normalize_kernel, preserve_nan):

    x = np.array([1.0, np.nan, 3.0], dtype=u'>f8')
    y = np.array([1.0, 1.0, 1.0], dtype=u'>f8')
    z = convolve(x, y, boundary=boundary, nan_treatment=nan_treatment, normalize_kernel=normalize_kernel, preserve_nan=preserve_nan)
    if preserve_nan:
        assert np.isnan(z[1])
    z = np.nan_to_num(z)
    rslt = {(None, u'interpolate', True): [0, 2, 0], (None, u'interpolate', False): [0, 6, 0], (None, u'fill', True): [0, (4 / 3.0), 0], (None, u'fill', False): [0, 4, 0], (u'fill', u'interpolate', True): [(1 / 2.0), 2, (3 / 2.0)], (u'fill', u'interpolate', False): [(3 / 2.0), 6, (9 / 2.0)], (u'fill', u'fill', True): [(1 / 3.0), (4 / 3.0), (3 / 3.0)], (u'fill', u'fill', False): [1, 4, 3], (u'wrap', u'interpolate', True): [2, 2, 2], (u'wrap', u'interpolate', False): [6, 6, 6], (u'wrap', u'fill', True): [(4 / 3.0), (4 / 3.0), (4 / 3.0)], (u'wrap', u'fill', False): [4, 4, 4], (u'extend', u'interpolate', True): [1, 2, 3], (u'extend', u'interpolate', False): [3, 6, 9], (u'extend', u'fill', True): [(2 / 3.0), (4 / 3.0), (6 / 3.0)], (u'extend', u'fill', False): [2, 4, 6]}[(boundary, nan_treatment, normalize_kernel)]
    if preserve_nan:
        rslt[1] = 0
    assert_array_almost_equal_nulp(z, np.array(rslt, dtype=u'>f8'), 10)
