gensim.matutils.MmReader.__init__

MmReader.__init__(input, transposed=True)[source]

Initialize the matrix reader.

The input refers to a file on local filesystem, which is expected to be in the sparse (coordinate) Matrix Market format. Documents are assumed to be rows of the matrix (and document features are columns).

input is either a string (file path) or a file-like object that supports seek() (e.g. gzip.GzipFile, bz2.BZ2File).