x = np.zeros((2, 2))
sigma = [1, 1]
y = sndi.gaussian_filter(x, sigma)
assert_allclose(x, y)
def test_orders_gauss():
// Check order inputs to Gaussians
After Change
out = sndi._ni_support._normalize_sequence(sigma, 2)
assert_equal(out, sigma)
// Also include the OPs original example to make sure we fixed the issue
x = np.random.normal(size=(256, 256))
perlin = np.zeros_like(x)
for i in 2**np.arange(6):
perlin += sndi.filters.gaussian_filter(x, i, mode="wrap") * i**2
// This also fixes gh-4106, show that the OPs example now runs.
x = np.int64(21)
sndi._ni_support._normalize_sequence(x, 0)