'Test GaussianKernel against SciPy ndimage gaussian filter.'

@pytest.mark.skipif(u'not    HAS_SCIPY')
@pytest.mark.parametrize(u'width', WIDTHS_ODD)
def test_scipy_filter_gaussian(self, width):

    gauss_kernel_1D = Gaussian1DKernel(width)
    gauss_kernel_1D.normalize()
    gauss_kernel_2D = Gaussian2DKernel(width)
    gauss_kernel_2D.normalize()
    astropy_1D = convolve(delta_pulse_1D, gauss_kernel_1D, boundary=u'fill')
    astropy_2D = convolve(delta_pulse_2D, gauss_kernel_2D, boundary=u'fill')
    scipy_1D = filters.gaussian_filter(delta_pulse_1D, width)
    scipy_2D = filters.gaussian_filter(delta_pulse_2D, width)
    assert_almost_equal(astropy_1D, scipy_1D, decimal=12)
    assert_almost_equal(astropy_2D, scipy_2D, decimal=12)
