7af3a07a9fe836f3dc7350732dd71cb214853533,nilearn/decomposition/base.py,,mask_and_reduce,#Any#Any#Any#Any#Any#Any#Any#Any#Any#,24

Before Change


        confounds = [None] * len(imgs)

    // Precomputing number of samples for preallocation
    subject_n_samples = np.zeros(len(imgs), dtype="int")
    for i, img in enumerate(imgs):
        this_n_samples = check_niimg_4d(img).shape[3]
        if reduction_ratio == "auto":
            subject_n_samples[i] = min(n_components,
                                       this_n_samples)
        else:
            subject_n_samples[i] = int(ceil(this_n_samples *
                                            reduction_ratio))
    n_voxels = np.sum(_safe_get_data(masker.mask_img_))
    n_samples = np.sum(subject_n_samples)

    // XXX Should we provided memory mapping for n_jobs > 1 to allow concurrent

After Change


            random_state=random_state
        ) for img, confound in zip(imgs, confounds))

    subject_n_samples = [subject_data.shape[0]
                         for subject_data in data_list]

    n_samples = np.sum(subject_n_samples)
    n_voxels = np.sum(_safe_get_data(masker.mask_img_))
    data = np.empty((n_samples, n_voxels), order="F",
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: nilearn/nilearn
Commit Name: 7af3a07a9fe836f3dc7350732dd71cb214853533
Time: 2015-12-04
Author: arthur.mensch@m4x.org
File Name: nilearn/decomposition/base.py
Class Name:
Method Name: mask_and_reduce


Project Name: Qiskit/qiskit-aqua
Commit Name: d892fb853c4c296539034d2dbaf304c0d06a357d
Time: 2018-07-06
Author: 34400304+liupibm@users.noreply.github.com
File Name: qiskit_acqua/ising/graphpartition.py
Class Name:
Method Name: sample_most_likely


Project Name: Qiskit/qiskit-aqua
Commit Name: a194557ba754f9b14d473ff9e39a2bc2449e58c1
Time: 2018-07-06
Author: chenrich@us.ibm.com
File Name: qiskit_acqua/ising/maxcut.py
Class Name:
Method Name: sample_most_likely