d69aa1862f77db07d8aee64303fa6576701850af,scanpy/preprocessing/_simple.py,,regress_out,#Any#Any#Any#Any#,572

Before Change


    if n_jobs > 1 and n_chunks > 1:
        import multiprocessing

        pool = multiprocessing.Pool(n_jobs)
        res = pool.map_async(_regress_out_chunk, tasks).get(9999999)
        pool.close()

    else:
        res = list(map(_regress_out_chunk, tasks))

After Change


    from joblib import Parallel, delayed

    // TODO: figure out how to test that this doesn"t oversubscribe resources
    res = Parallel(n_jobs=n_jobs)(delayed(_regress_out_chunk)(task) for task in tasks)

    // res is a list of vectors (each corresponding to a regressed gene column).
    // The transpose is needed to get the matrix in the shape needed
    adata.X = np.vstack(res).T.astype(adata.X.dtype)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: theislab/scanpy
Commit Name: d69aa1862f77db07d8aee64303fa6576701850af
Time: 2021-03-03
Author: ivirshup@gmail.com
File Name: scanpy/preprocessing/_simple.py
Class Name:
Method Name: regress_out


Project Name: etal/cnvkit
Commit Name: ce579cf021ca1ee0705bd9484aae55e0d110d0e7
Time: 2016-09-08
Author: eric.talevich@gmail.com
File Name: cnvlib/commands.py
Class Name:
Method Name: batch_make_reference


Project Name: openeventdata/mordecai
Commit Name: 580af77a96d8c6b306ad4425eafd7768df00338a
Time: 2018-06-27
Author: ahalterman0@gmail.com
File Name: mordecai/geoparse.py
Class Name: Geoparser
Method Name: batch_geoparse


Project Name: NervanaSystems/nlp-architect
Commit Name: 4d8cca40654deb641809bf8fb376afd9b1633d52
Time: 2019-03-31
Author: daniel.korat@intel.com
File Name: nlp_architect/data/cdc_resources/gen_scripts/create_word_embed_glove_dump.py
Class Name:
Method Name: load_glove_for_vocab