def mmwrite(target, a, comment='<STR_LIT>', field=None, precision=None):
MMFile().write(target, a, comment, field, precision)<EOL>
Writes the sparse or dense array `a` to a Matrix Market formatted file.

Parameters
----------
target : file
    Matrix Market filename (extension .mtx) or open file 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.