Python scipy.sparse 模块,tocsc() 实例源码

我们从Python开源项目中,提取了以下7个代码示例,用于说明如何使用scipy.sparse.tocsc()

项目:paragraph2vec    作者:thunlp    | 项目源码 | 文件源码
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len())
项目:topical_word_embeddings    作者:thunlp    | 项目源码 | 文件源码
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len())
项目:topical_word_embeddings    作者:thunlp    | 项目源码 | 文件源码
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len())
项目:topical_word_embeddings    作者:thunlp    | 项目源码 | 文件源码
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len())
项目:nonce2vec    作者:minimalparts    | 项目源码 | 文件源码
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len())
项目:ohmnet    作者:marinkaz    | 项目源码 | 文件源码
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len())
项目:doc2vec    作者:stanlee5    | 项目源码 | 文件源码
def __init__(self, sparse, documents_columns=True):
        if documents_columns:
            self.sparse = sparse.tocsc()
        else:
            self.sparse = sparse.tocsr().T # make sure shape[1]=number of docs (needed in len())