docstr: Writes sparse or dense array `a` to Matrix Market file-like `target`.
  
  Parameters
  ----------
  target : str or file-like
      Matrix Market filename (extension .mtx) or open file-like object.
  a : array like
      Sparse or dense 2D array.
  comment : str, optional
      Comments to be prepended to the Matrix Market file.
  field : None or str, optional
      Either 'real', 'complex', 'pattern', or 'integer'.
  precision : None or int, optional
      Number of digits to display for real or complex values.
  symmetry : None or str, optional
      Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
      If symmetry is None the symmetry type of 'a' is determined by its
      values.
docstr_tok: ["Writes","sparse","or","dense","array","`","a","`","to","Matrix","Market","file-like","`","target","`",".","Parameters","--","--","--","--","--","target",":","str","or","file-like","Matrix","Market","filename","(","extension",".mtx",")","or","open","file-like","object",".","a",":","array","like","Sparse","or","dense","2D","array",".","comment",":","str",",","optional","Comments","to","be","prepended","to","the","Matrix","Market","file",".","field",":","None","or","str",",","optional","Either","'real","'",",","'complex","'",",","'pattern","'",",","or","'integer","'",".","precision",":","None","or","int",",","optional","Number","of","digits","to","display","for","real","or","complex","values",".","symmetry",":","None","or","str",",","optional","Either","'general","'",",","'symmetric","'",",","'skew-symmetric","'",",","or","'hermitian","'",".","If","symmetry","is","None","the","symmetry","type","of","'","a","'","is","determined","by","its","values","."]
code: def write(
      self,
      target,
      a,
      comment="",
      field=None,
      precision=None,
      symmetry=None,
  ):
      """
      Writes sparse or dense array `a` to Matrix Market file-like `target`.
  
      Parameters
      ----------
      target : str or file-like
          Matrix Market filename (extension .mtx) or open file-like object.
      a : array like
          Sparse or dense 2D array.
      comment : str, optional
          Comments to be prepended to the Matrix Market file.
      field : None or str, optional
          Either 'real', 'complex', 'pattern', or 'integer'.
      precision : None or int, optional
          Number of digits to display for real or complex values.
      symmetry : None or str, optional
          Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
          If symmetry is None the symmetry type of 'a' is determined by its
          values.
      """
  
      stream, close_it = self._open(target, "wb")
  
      try:
          self._write(stream, a, comment, field, precision, symmetry)
  
      finally:
          if close_it:
              stream.close()
          else:
              stream.flush()
  
imports: from __future__ import division, print_function, absolute_import
  import os
  import sys
  from numpy import asarray, real, imag, conj, zeros, ndarray, concatenate, ones, can_cast
  from numpy.compat import asbytes, asstr
  from scipy._lib.six import string_types
  from scipy.sparse import coo_matrix, isspmatrix
label_desc: Use image node_id 19 for calling the MMFile obj's underlying member method code with example usage: obj.write(target, a, comment, field, precision, symmetry) without return types