parameters: (text)
return_statement: return x
docstring: Reads a matrix from a string in the format
      m n
      x11 x12 ... x1n
      ...
      xm1 xm2 ... xmn
docstring_summary: Reads a matrix from a string in the format
      m n
      x11 x12 ... x1n
      ...
      xm1 xm2 ... xmn
docstring_tokens: Reads a matrix from a string in the format m n x11 x12 ... x1n ... xm1 xm2 ... xmn
function: def readMatrix(text):
      """Reads a matrix from a string in the format
      m n
      x11 x12 ... x1n
      ...
      xm1 xm2 ... xmn
      """
      items = text.split()
      if len(items) < 2: raise ValueError("Invalid matrix string")
      m,n = int(items[0]),int(items[1])
      if len(items) != 2 + m*n:
          raise ValueError("Invalid number of matrix elements, should be %d, instead got %d"%(m*n,len(items)-2))
      k = 2
      x = []
      for i in xrange(m):
          x.append([float(v) for v in items[k:k+n]])
          k += n
      return x
function_tokens: def readMatrix ( text ) : items = text . split ( ) if len ( items ) < 2 : raise ValueError ( "Invalid matrix string" ) m , n = int ( items [ 0 ] ) , int ( items [ 1 ] ) if len ( items ) != 2 + m * n : raise ValueError ( "Invalid number of matrix elements, should be %d, instead got %d" % ( m * n , len ( items ) - 2 ) ) k = 2 x = [ ] for i in xrange ( m ) : x . append ( [ float ( v ) for v in items [ k : k + n ] ] ) k += n return x