51d6b543e193cf385f97ff216400a7f0f54f289a,nilearn/input_data/tests/test_nifti_masker.py,,test_mask_4d,#,114
Before Change
data_img_4d = Nifti1Image(data, np.eye(4))
data_imgs = [Nifti1Image(data[..., 0], np.eye(4)),
Nifti1Image(data[..., 1], np.eye(4)),
Nifti1Image(data[..., 2], np.eye(4))]
// check whether transform is indeed selecting niimgs subset
sample_mask = (True, False, True)
After Change
index_img(data_img_4d, 2)]
// check whether transform is indeed selecting niimgs subset
sample_mask = np.array([0, 2])
masker = NiftiMasker(mask_img=mask_img, sample_mask=sample_mask)
masker.fit()
data_trans = masker.transform(data_imgs)
data_trans_img = index_img(data_img_4d, sample_mask)
data_trans_direct = data_trans_img.get_data()[mask_bool, :]
data_trans_direct = np.swapaxes(data_trans_direct, 0, 1)
assert_array_equal(data_trans, data_trans_direct)
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: dPys/PyNets
Commit Name: 01d18e835815feedeac2fbeff8025cdd94128eaa
Time: 2019-12-09
Author: dpisner@utexas.edu
File Name: pynets/fmri/clustools.py
Class Name: NilParcellate
Method Name: create_clean_mask
Project Name: nipy/dipy
Commit Name: b92be51f6fc463ab7deef20fab640b3b2f50b497
Time: 2013-08-06
Author: garyfallidis@gmail.com
File Name: doc/examples/brain_extraction.py
Class Name:
Method Name: