gensim.matutils.full2sparse()

gensim.matutils.full2sparse(vec, eps=1e-09)[source]

Convert a dense numpy array into the sparse document format (sequence of 2-tuples).

Values of magnitude < eps are treated as zero (ignored).

This is the mirror function to sparse2full.