e9402dd24f071e7dbe4e0c2421f90f285ca31896,scipy/ndimage/tests/test_filters.py,,test_gh_5430,#,23

Before Change


    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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: scipy/scipy
Commit Name: e9402dd24f071e7dbe4e0c2421f90f285ca31896
Time: 2015-11-15
Author: person142@users.noreply.github.com
File Name: scipy/ndimage/tests/test_filters.py
Class Name:
Method Name: test_gh_5430


Project Name: glm-tools/pyglmnet
Commit Name: 750d6a20cb203261e17d5f2709a00ec62a37dfed
Time: 2016-07-20
Author: pavan.ramkumar@gmail.com
File Name: tests/test_pyglmnet.py
Class Name:
Method Name: test_glmnet


Project Name: google-research/google-research
Commit Name: 2a11d3f0bad2430b81628fa6cb0a6301d099d77d
Time: 2020-12-11
Author: xingyousong@google.com
File Name: performer/fast_attention/tensorflow/fast_attention_test.py
Class Name: TransformerLayersTest
Method Name: test_softmax_noncausal_attention_block_output