51d6b543e193cf385f97ff216400a7f0f54f289a,nilearn/input_data/tests/test_nifti_masker.py,,test_mask_4d,#,114

Before Change


        Nifti1Image(data[..., 2], np.eye(4))]

    // check whether transform is indeed selecting niimgs subset
    sample_mask = (True, False, True)
    masker = NiftiMasker(mask_img=mask_img, sample_mask=sample_mask)
    masker.fit()
    data_trans = masker.transform(data_imgs)
    data_trans_direct = data_img_4d.get_data()[mask_bool, :][..., sample_mask]
    data_trans_direct = np.swapaxes(data_trans_direct, 0, 1)
    assert_array_equal(data_trans, data_trans_direct)

    masker = NiftiMasker(mask_img=mask_img, sample_mask=sample_mask)

After Change


    data[..., 1] = 2
    data[..., 2] = 3
    data_img_4d = Nifti1Image(data, np.eye(4))
    data_imgs = [index_img(data_img_4d, 0), index_img(data_img_4d, 1),
                 index_img(data_img_4d, 2)]

    // check whether transform is indeed selecting niimgs subset
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: nilearn/nilearn
Commit Name: 51d6b543e193cf385f97ff216400a7f0f54f289a
Time: 2015-02-11
Author: danilobzdok@gmail.com
File Name: nilearn/input_data/tests/test_nifti_masker.py
Class Name:
Method Name: test_mask_4d


Project Name: nilearn/nilearn
Commit Name: 45dfe409dfbd666d807ed62d025cb5ebaa911a43
Time: 2015-01-31
Author: danilobzdok@gmail.com
File Name: examples/plot_nifti_simple.py
Class Name:
Method Name:


Project Name: nilearn/nilearn
Commit Name: 45dfe409dfbd666d807ed62d025cb5ebaa911a43
Time: 2015-01-31
Author: danilobzdok@gmail.com
File Name: examples/connectivity/plot_ica_resting_state.py
Class Name:
Method Name: