class_docstr: Store a corpus in `Matrix Market format <https://math.nist.gov/MatrixMarket/formats.html>`_,
  using :class:`~gensim.corpora.mmcorpus.MmCorpus`.
  
  Notes
  -----
  The output is written one document at a time, not the whole matrix at once (unlike e.g. `scipy.io.mmread`).
  This allows you to write corpora which are larger than the available RAM.
  
  The output file is created in a single pass through the input corpus, so that the input can be
  a once-only stream (generator).
  
  To achieve this, a fake MM header is written first, corpus statistics are collected
  during the pass (shape of the matrix, number of non-zeroes), followed by a seek back to the beginning of the file,
  rewriting the fake header with the final values.
class_docstr_tok: ["Store","a","corpus","in","`","Matrix","Market","format","<","https",":","\/\/math.nist.gov\/MatrixMarket\/formats.html",">","`","_",",","using",":","class",":","`","~gensim.corpora.mmcorpus.MmCorpus","`",".","Notes","--","--","-","The","output","is","written","one","document","at","a","time",",","not","the","whole","matrix","at","once","(","unlike","e.g",".","`","scipy.io.mmread","`",")",".","This","allows","you","to","write","corpora","which","are","larger","than","the","available","RAM",".","The","output","file","is","created","in","a","single","pass","through","the","input","corpus",",","so","that","the","input","can","be","a","once-only","stream","(","generator",")",".","To","achieve","this",",","a","fake","MM","header","is","written","first",",","corpus","statistics","are","collected","during","the","pass","(","shape","of","the","matrix",",","number","of","non-zeroes",")",",","followed","by","a","seek","back","to","the","beginning","of","the","file",",","rewriting","the","fake","header","with","the","final","values","."]
docstr: Close `self.fout` file.
docstr_tok: ["Close","`","self.fout","`","file","."]
code: def close(self):
      """Close `self.fout` file."""
      logger.debug("closing %s", self.fname)
      if hasattr(self, "fout"):
          self.fout.close()
  
imports: from __future__ import with_statement
  import logging
  import math
  from gensim import utils
  import numpy
  import scipy.sparse
  from scipy.stats import entropy
  from scipy.linalg import get_blas_funcs, triu
  from scipy.linalg.lapack import get_lapack_funcs
  from scipy.special import psi
label_desc: Use image node_id 7 for calling the MmWriter obj's underlying member method code with example usage: obj.close() without return types