class_docstr: matrix(data, dtype=None, copy=True)
  
  .. note:: It is no longer recommended to use this class, even for linear
            algebra. Instead use regular arrays. The class may be removed
            in the future.
  
  Returns a matrix from an array-like object, or from a string of data.
  A matrix is a specialized 2-D array that retains its 2-D nature
  through operations.  It has certain special operators, such as ``*``
  (matrix multiplication) and ``**`` (matrix power).
  
  Parameters
  ----------
  data : array_like or string
     If `data` is a string, it is interpreted as a matrix with commas
     or spaces separating columns, and semicolons separating rows.
  dtype : data-type
     Data-type of the output matrix.
  copy : bool
     If `data` is already an `ndarray`, then this flag determines
     whether the data is copied (the default), or whether a view is
     constructed.
  
  See Also
  --------
  array
  
  Examples
  --------
  >>> a = np.matrix('1 2; 3 4')
  >>> a
  matrix([[1, 2],
          [3, 4]])
  
  >>> np.matrix([[1, 2], [3, 4]])
  matrix([[1, 2],
          [3, 4]])
class_docstr_tok: ["matrix","(","data",",","dtype=None",",","copy=True",")","..","note",":",":","It","is","no","longer","recommended","to","use","this","class",",","even","for","linear","algebra",".","Instead","use","regular","arrays",".","The","class","may","be","removed","in","the","future",".","Returns","a","matrix","from","an","array-like","object",",","or","from","a","string","of","data",".","A","matrix","is","a","specialized","2-D","array","that","retains","its","2-D","nature","through","operations",".","It","has","certain","special","operators",",","such","as","``","*","``","(","matrix","multiplication",")","and","``","*","*","``","(","matrix","power",")",".","Parameters","--","--","--","--","--","data",":","array_like","or","string","If","`","data","`","is","a","string",",","it","is","interpreted","as","a","matrix","with","commas","or","spaces","separating","columns",",","and","semicolons","separating","rows",".","dtype",":","data-type","Data-type","of","the","output","matrix",".","copy",":","bool","If","`","data","`","is","already","an","`","ndarray","`",",","then","this","flag","determines","whether","the","data","is","copied","(","the","default",")",",","or","whether","a","view","is","constructed",".","See","Also","--","--","--","--","array","Examples","--","--","--","--",">",">",">","a","=","np.matrix","(","'","1","2",";","3","4","'",")",">",">",">","a","matrix","(","[","[","1",",","2","]",",","[","3",",","4","]","]",")",">",">",">","np.matrix","(","[","[","1",",","2","]",",","[","3",",","4","]","]",")","matrix","(","[","[","1",",","2","]",",","[","3",",","4","]","]",")"]
docstr: Return a flattened matrix.
  
  Refer to `numpy.ravel` for more documentation.
  
  Parameters
  ----------
  order : {'C', 'F', 'A', 'K'}, optional
      The elements of `m` are read using this index order. 'C' means to
      index the elements in C-like order, with the last axis index
      changing fastest, back to the first axis index changing slowest.
      'F' means to index the elements in Fortran-like index order, with
      the first index changing fastest, and the last index changing
      slowest. Note that the 'C' and 'F' options take no account of the
      memory layout of the underlying array, and only refer to the order
      of axis indexing.  'A' means to read the elements in Fortran-like
      index order if `m` is Fortran *contiguous* in memory, C-like order
      otherwise.  'K' means to read the elements in the order they occur
      in memory, except for reversing the data when strides are negative.
      By default, 'C' index order is used.
  
  Returns
  -------
  ret : matrix
      Return the matrix flattened to shape `(1, N)` where `N`
      is the number of elements in the original matrix.
      A copy is made only if necessary.
  
  See Also
  --------
  matrix.flatten : returns a similar output matrix but always a copy
  matrix.flat : a flat iterator on the array.
  numpy.ravel : related function which returns an ndarray
docstr_tok: ["Return","a","flattened","matrix",".","Refer","to","`","numpy.ravel","`","for","more","documentation",".","Parameters","--","--","--","--","--","order",":","{","'","C","'",",","'","F","'",",","'","A","'",",","'","K","'","}",",","optional","The","elements","of","`","m","`","are","read","using","this","index","order",".","'","C","'","means","to","index","the","elements","in","C-like","order",",","with","the","last","axis","index","changing","fastest",",","back","to","the","first","axis","index","changing","slowest",".","'","F","'","means","to","index","the","elements","in","Fortran-like","index","order",",","with","the","first","index","changing","fastest",",","and","the","last","index","changing","slowest",".","Note","that","the","'","C","'","and","'","F","'","options","take","no","account","of","the","memory","layout","of","the","underlying","array",",","and","only","refer","to","the","order","of","axis","indexing",".","'","A","'","means","to","read","the","elements","in","Fortran-like","index","order","if","`","m","`","is","Fortran","*","contiguous","*","in","memory",",","C-like","order","otherwise",".","'","K","'","means","to","read","the","elements","in","the","order","they","occur","in","memory",",","except","for","reversing","the","data","when","strides","are","negative",".","By","default",",","'","C","'","index","order","is","used",".","Returns","--","--","--","-","ret",":","matrix","Return","the","matrix","flattened","to","shape","`","(","1",",","N",")","`","where","`","N","`","is","the","number","of","elements","in","the","original","matrix",".","A","copy","is","made","only","if","necessary",".","See","Also","--","--","--","--","matrix.flatten",":","returns","a","similar","output","matrix","but","always","a","copy","matrix.flat",":","a","flat","iterator","on","the","array",".","numpy.ravel",":","related","function","which","returns","an","ndarray"]
code: def ravel(self, order="C"):
      """
      Return a flattened matrix.
  
      Refer to `numpy.ravel` for more documentation.
  
      Parameters
      ----------
      order : {'C', 'F', 'A', 'K'}, optional
          The elements of `m` are read using this index order. 'C' means to
          index the elements in C-like order, with the last axis index
          changing fastest, back to the first axis index changing slowest.
          'F' means to index the elements in Fortran-like index order, with
          the first index changing fastest, and the last index changing
          slowest. Note that the 'C' and 'F' options take no account of the
          memory layout of the underlying array, and only refer to the order
          of axis indexing.  'A' means to read the elements in Fortran-like
          index order if `m` is Fortran *contiguous* in memory, C-like order
          otherwise.  'K' means to read the elements in the order they occur
          in memory, except for reversing the data when strides are negative.
          By default, 'C' index order is used.
  
      Returns
      -------
      ret : matrix
          Return the matrix flattened to shape `(1, N)` where `N`
          is the number of elements in the original matrix.
          A copy is made only if necessary.
  
      See Also
      --------
      matrix.flatten : returns a similar output matrix but always a copy
      matrix.flat : a flat iterator on the array.
      numpy.ravel : related function which returns an ndarray
  
      """
      return N.ndarray.ravel(self, order=order)
  
imports: import sys
  import warnings
  import ast
  from .._utils import set_module
  import numpy.core.numeric
  from numpy.core.numeric import concatenate, isscalar
  from numpy.linalg import matrix_power
label_desc: Use image node_id 30 for calling the matrix obj's underlying member method code with example usage: obj.ravel(order) and returns: N