docstr: Return size, storage parameters from Matrix Market file-like 'source'.
  
  Parameters
  ----------
  source : str or file-like
      Matrix Market filename (extension .mtx) or open file-like object
  
  Returns
  -------
  rows : int
      Number of matrix rows.
  cols : int
      Number of matrix columns.
  entries : int
      Number of non-zero entries of a sparse matrix
      or rows*cols for a dense matrix.
  format : str
      Either 'coordinate' or 'array'.
  field : str
      Either 'real', 'complex', 'pattern', or 'integer'.
  symmetry : str
      Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
docstr_tok: ["Return","size",",","storage","parameters","from","Matrix","Market","file-like","'source","'",".","Parameters","--","--","--","--","--","source",":","str","or","file-like","Matrix","Market","filename","(","extension",".mtx",")","or","open","file-like","object","Returns","--","--","--","-","rows",":","int","Number","of","matrix","rows",".","cols",":","int","Number","of","matrix","columns",".","entries",":","int","Number","of","non-zero","entries","of","a","sparse","matrix","or","rows","*","cols","for","a","dense","matrix",".","format",":","str","Either","'coordinate","'","or","'array","'",".","field",":","str","Either","'real","'",",","'complex","'",",","'pattern","'",",","or","'integer","'",".","symmetry",":","str","Either","'general","'",",","'symmetric","'",",","'skew-symmetric","'",",","or","'hermitian","'","."]
code: def info(self, source):
      """
      Return size, storage parameters from Matrix Market file-like 'source'.
  
      Parameters
      ----------
      source : str or file-like
          Matrix Market filename (extension .mtx) or open file-like object
  
      Returns
      -------
      rows : int
          Number of matrix rows.
      cols : int
          Number of matrix columns.
      entries : int
          Number of non-zero entries of a sparse matrix
          or rows*cols for a dense matrix.
      format : str
          Either 'coordinate' or 'array'.
      field : str
          Either 'real', 'complex', 'pattern', or 'integer'.
      symmetry : str
          Either 'general', 'symmetric', 'skew-symmetric', or 'hermitian'.
      """
  
      stream, close_it = self._open(source)
  
      try:
          # read and validate header line
          line = stream.readline()
          mmid, matrix, format, field, symmetry = [
              asstr(part.strip()) for part in line.split()
          ]
          if not mmid.startswith("%%MatrixMarket"):
              raise ValueError("source is not in Matrix Market format")
          if not matrix.lower() == "matrix":
              raise ValueError("Problem reading file header: " + line)
  
          # http://math.nist.gov/MatrixMarket/formats.html
          if format.lower() == "array":
              format = self.FORMAT_ARRAY
          elif format.lower() == "coordinate":
              format = self.FORMAT_COORDINATE
  
          # skip comments
          while line.startswith(b"%"):
              line = stream.readline()
  
          line = line.split()
          if format == self.FORMAT_ARRAY:
              if not len(line) == 2:
                  raise ValueError(
                      "Header line not of length 2: " + line
                  )
              rows, cols = map(int, line)
              entries = rows * cols
          else:
              if not len(line) == 3:
                  raise ValueError(
                      "Header line not of length 3: " + line
                  )
              rows, cols, entries = map(int, line)
  
          return (
              rows,
              cols,
              entries,
              format,
              field.lower(),
              symmetry.lower(),
          )
  
      finally:
          if close_it:
              stream.close()
  
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 13 for calling the MMFile obj's underlying member method code with example usage: obj.info(source) and returns: rows,  cols,  entries,  format,  field,  symmetry