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,

After Change


                             "got %.2f" % reduction_ratio)

    if confounds is None:
        confounds = itertools.repeat(confounds)

    if reduction_ratio == "auto":
        n_samples = n_components
        reduction_ratio = None
    else:
        // We"ll let _mask_and_reduce_single decide on the number of
        // samples based on the reduction_ratio
        n_samples = None

    data_list = Parallel(n_jobs=n_jobs)(
        delayed(_mask_and_reduce_single)(
            masker,
            img, confound,
            reduction_ratio=reduction_ratio,
            n_samples=n_samples,
            memory=memory,
            memory_level=memory_level,
            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: 4

Non-data size: 4

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: nipy/dipy
Commit Name: a731dbfb00e17f59b55d0b36a14f69c65e9a849a
Time: 2012-04-05
Author: Bago.Amirbekian@ucsf.edu
File Name: dipy/reconst/tests/test_shm.py
Class Name:
Method Name: test_normalize_data


Project Name: matplotlib/matplotlib
Commit Name: d376dad7dc1ceda0b01544e02db5fa05ad793163
Time: 2019-01-22
Author: rth.yurchak@pm.me
File Name: lib/matplotlib/tri/trirefine.py
Class Name: UniformTriRefiner
Method Name: _refine_triangulation_once


Project Name: PavlosMelissinos/enet-keras
Commit Name: d529bddab06f83cbc3792acc18e18b57a74263f3
Time: 2017-05-15
Author: pmelissi@iti.gr
File Name: src/data/utils.py
Class Name:
Method Name: one_hot_to_rgb