class_docstr: Compute cosine similarity against a corpus of documents by storing the index matrix in memory.
  
  Unless the entire matrix fits into main memory, use :class:`~gensim.similarities.docsim.Similarity` instead.
  
  Examples
  --------
  .. sourcecode:: pycon
  
      >>> from gensim.test.utils import common_corpus, common_dictionary
      >>> from gensim.similarities import MatrixSimilarity
      >>>
      >>> query = [(1, 2), (5, 4)]
      >>> index = MatrixSimilarity(common_corpus, num_features=len(common_dictionary))
      >>> sims = index[query]
class_docstr_tok: ["Compute","cosine","similarity","against","a","corpus","of","documents","by","storing","the","index","matrix","in","memory",".","Unless","the","entire","matrix","fits","into","main","memory",",","use",":","class",":","`","~gensim.similarities.docsim.Similarity","`","instead",".","Examples","--","--","--","--","..","sourcecode",":",":","pycon",">",">",">","from","gensim.test.utils","import","common_corpus",",","common_dictionary",">",">",">","from","gensim.similarities","import","MatrixSimilarity",">",">",">",">",">",">","query","=","[","(","1",",","2",")",",","(","5",",","4",")","]",">",">",">","index","=","MatrixSimilarity","(","common_corpus",",","num_features=len","(","common_dictionary",")",")",">",">",">","sims","=","index","[","query","]"]
code: def __str__(self):
      return "%s<%i docs, %i features>" % (
          self.__class__.__name__,
          len(self),
          self.index.shape[1],
      )
  
imports: import logging
  import itertools
  import os
  import heapq
  import warnings
  import numpy
  import scipy.sparse
  from gensim import interfaces, utils, matutils
label_desc: Use image node_id 4 for calling the MatrixSimilarity obj's underlying member method code with example usage: obj.__str__() and returns: unknown