gensim.matutils.corpus2dense()

gensim.matutils.corpus2dense(corpus, num_terms, num_docs=None, dtype=<type 'numpy.float32'>)[source]

Convert corpus into a dense numpy array (documents will be columns). You must supply the number of features num_terms, because dimensionality cannot be deduced from the sparse vectors alone.

You can optionally supply num_docs (=the corpus length) as well, so that a more memory-efficient code path is taken.

This is the mirror function to Dense2Corpus.