class_docstr: matrix(data, dtype=None, copy=True)
  
  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).
  
  .. 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.
  
  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",")","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",")",".","..","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",".","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: Returns the variance of the matrix elements, along the given axis.
  
  Refer to `numpy.var` for full documentation.
  
  See Also
  --------
  numpy.var
  
  Notes
  -----
  This is the same as `ndarray.var`, except that where an `ndarray` would
  be returned, a `matrix` object is returned instead.
  
  Examples
  --------
  >>> x = np.matrix(np.arange(12).reshape((3, 4)))
  >>> x
  matrix([[ 0,  1,  2,  3],
          [ 4,  5,  6,  7],
          [ 8,  9, 10, 11]])
  >>> x.var()
  11.916666666666666
  >>> x.var(0)
  matrix([[ 10.66666667,  10.66666667,  10.66666667,  10.66666667]]) # may vary
  >>> x.var(1)
  matrix([[1.25],
          [1.25],
          [1.25]])
docstr_tok: ["Returns","the","variance","of","the","matrix","elements",",","along","the","given","axis",".","Refer","to","`","numpy.var","`","for","full","documentation",".","See","Also","--","--","--","--","numpy.var","Notes","--","--","-","This","is","the","same","as","`","ndarray.var","`",",","except","that","where","an","`","ndarray","`","would","be","returned",",","a","`","matrix","`","object","is","returned","instead",".","Examples","--","--","--","--",">",">",">","x","=","np.matrix","(","np.arange","(","12",")",".reshape","(","(","3",",","4",")",")",")",">",">",">","x","matrix","(","[","[","0",",","1",",","2",",","3","]",",","[","4",",","5",",","6",",","7","]",",","[","8",",","9",",","10",",","11","]","]",")",">",">",">","x.var","(",")","11.916666666666666",">",">",">","x.var","(","0",")","matrix","(","[","[","10.66666667",",","10.66666667",",","10.66666667",",","10.66666667","]","]",")","#","may","vary",">",">",">","x.var","(","1",")","matrix","(","[","[","1.25","]",",","[","1.25","]",",","[","1.25","]","]",")"]
code: def var(self, axis=None, dtype=None, out=None, ddof=0):
      """
      Returns the variance of the matrix elements, along the given axis.
  
      Refer to `numpy.var` for full documentation.
  
      See Also
      --------
      numpy.var
  
      Notes
      -----
      This is the same as `ndarray.var`, except that where an `ndarray` would
      be returned, a `matrix` object is returned instead.
  
      Examples
      --------
      >>> x = np.matrix(np.arange(12).reshape((3, 4)))
      >>> x
      matrix([[ 0,  1,  2,  3],
              [ 4,  5,  6,  7],
              [ 8,  9, 10, 11]])
      >>> x.var()
      11.916666666666666
      >>> x.var(0)
      matrix([[ 10.66666667,  10.66666667,  10.66666667,  10.66666667]]) # may vary
      >>> x.var(1)
      matrix([[1.25],
              [1.25],
              [1.25]])
  
      """
      return N.ndarray.var(
          self, axis, dtype, out, ddof, keepdims=True
      )._collapse(axis)
  
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 18 for calling the matrix obj's underlying member method code with example usage: obj.var(axis, dtype, out, ddof) and returns: N