c55d1b295cb6717ba6494917b88183e8d3f284a9,src/gensim/matutils.py,,corpus2csc,#Any#Any#Any#,24

Before Change


        mat.data.append([val for _, val in doc])
    docs = i + 1
    mat._shape = (docs, m)
    mat = mat.tocsr().transpose() // transpose back to documents=columns
    assert isinstance(mat, scipy.sparse.csc_matrix)
    return mat

After Change


    with documents as columns.
    
    logger.debug("constructing sparse document matrix")
    docs, data, indices, indptr = 0, [], [], [0]
    for doc in corpus:
        indptr.append(len(doc))
        indices.extend([feature_id for feature_id, _ in doc])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: RaRe-Technologies/gensim
Commit Name: c55d1b295cb6717ba6494917b88183e8d3f284a9
Time: 2010-09-05
Author: piskvorky@92d0401f-a546-4972-9173-107b360ed7e5
File Name: src/gensim/matutils.py
Class Name:
Method Name: corpus2csc


Project Name: lmcinnes/umap
Commit Name: 357c43209a62332d16d847a093f95cf0643e7e6d
Time: 2018-09-29
Author: joseph.m.courtney@gmail.com
File Name: umap/umap_.py
Class Name: UMAP
Method Name: fit


Project Name: RaRe-Technologies/gensim
Commit Name: cac5f014c09193f7a5ad6b71e4012defa0a96baa
Time: 2010-09-05
Author: radimrehurek@seznam.cz
File Name: src/gensim/matutils.py
Class Name:
Method Name: corpus2csc