0c6388a26950beaeec0925e67b9bfb55ccfa2fde,nilearn/image/tests/test_resampling.py,,test_resampling_error_checks,#,219

Before Change


    shape = (3, 2, 5, 2)
    target_shape = (5, 3, 2)
    affine = np.eye(4)
    data = np.random.randint(0, 10, shape)
    img = Nifti1Image(data, affine)

    // Correct parameters: no exception
    resample_img(img, target_shape=target_shape, target_affine=affine)

After Change




def test_resampling_error_checks():
    rng = np.random.RandomState(42)
    shape = (3, 2, 5, 2)
    target_shape = (5, 3, 2)
    affine = np.eye(4)
    data = rng.randint(0, 10, shape)
    img = Nifti1Image(data, affine)

    // Correct parameters: no exception
    resample_img(img, target_shape=target_shape, target_affine=affine)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: nilearn/nilearn
Commit Name: 0c6388a26950beaeec0925e67b9bfb55ccfa2fde
Time: 2020-10-06
Author: 46817791+chouhanaryan@users.noreply.github.com
File Name: nilearn/image/tests/test_resampling.py
Class Name:
Method Name: test_resampling_error_checks


Project Name: nilearn/nilearn
Commit Name: 0c6388a26950beaeec0925e67b9bfb55ccfa2fde
Time: 2020-10-06
Author: 46817791+chouhanaryan@users.noreply.github.com
File Name: nilearn/image/tests/test_resampling.py
Class Name:
Method Name: test_identity_resample


Project Name: chainer/chainer
Commit Name: 990922266fc6f265c8bb0dfa9e45af827d57bf02
Time: 2019-10-31
Author: niboshi000@gmail.com
File Name: tests/chainerx_tests/unit_tests/routines_tests/test_indexing.py
Class Name:
Method Name: _random_condition