docstr: ivy.Array instance method variant of ivy.matrix_rank. This method
  returns the rank (i.e., number of non-zero singular values) of a matrix
  (or a stack of matrices).
  
  Parameters
  ----------
  self
      input array having shape ``(..., M, N)`` and whose innermost two dimensions
      form ``MxN`` matrices. Should have a floating-point data type.
  
  atol
      absolute tolerance. When None it’s considered to be zero.
  
  rtol
      relative tolerance for small singular values. Singular values approximately
      less than or equal to ``rtol * largest_singular_value`` are set to zero.
      If a ``float``, the value is equivalent to a zero-dimensional array having
      a floating-point data type determined by :ref:`type-promotion`
      (as applied to ``x``) and must be broadcast against each matrix.
      If an ``array``, must have a floating-point data type and must be
      compatible with ``shape(x)[:-2]`` (see :ref:`broadcasting`).
      If ``None``, the default value is ``max(M, N) * eps``, where ``eps`` must
      be the machine epsilon associated with the floating-point data type
      determined by :ref:`type-promotion` (as applied to ``x``).
      Default: ``None``.
  
  hermitian
      indicates whether ``x`` is Hermitian. When ``hermitian=True``, ``x`` is
      assumed to be Hermitian, enabling a more efficient method for finding
      eigenvalues, but x is not checked inside the function. Instead, We just use
      the lower triangular of the matrix to compute.
      Default: ``False``.
  
  out
      optional output array, for writing the result to. It must have a shape that
      the inputs broadcast to.
  
  Returns
  -------
  ret
      a container containing the ranks. The returned array must have a
      floating-point data type determined by :ref:`type-promotion` and
      must have shape ``(...)``
      (i.e., must have a shape equal to ``shape(x)[:-2]``).
  
  Examples
  --------
  1. Full Matrix
  >>> x = ivy.array([[1., 2.], [3., 4.]])
  >>> ivy.matrix_rank(x)
  ivy.array(2.)
  
  2. Rank Deficient Matrix
  >>> x = ivy.array([[1., 0.], [0., 0.]])
  >>> ivy.matrix_rank(x)
  ivy.array(1.)
  
  3. 1 Dimension - rank 1 unless all 0
  >>> x = ivy.array([[1., 1.])
  >>> ivy.matrix_rank(x)
  ivy.array(1.)
  
  >>> x = ivy.array([[0., 0.])
  >>> ivy.matrix_rank(x)
  ivy.array(0)
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy.matrix_rank",".","This","method","returns","the","rank","(","i.e.",",","number","of","non-zero","singular","values",")","of","a","matrix","(","or","a","stack","of","matrices",")",".","Parameters","--","--","--","--","--","self","input","array","having","shape","``","(","...",",","M",",","N",")","``","and","whose","innermost","two","dimensions","form","``","MxN","``","matrices",".","Should","have","a","floating-point","data","type",".","atol","absolute","tolerance",".","When","None","it","\u2019","s","considered","to","be","zero",".","rtol","relative","tolerance","for","small","singular","values",".","Singular","values","approximately","less","than","or","equal","to","``","rtol","*","largest_singular_value","``","are","set","to","zero",".","If","a","``","float","``",",","the","value","is","equivalent","to","a","zero-dimensional","array","having","a","floating-point","data","type","determined","by",":","ref",":","`","type-promotion","`","(","as","applied","to","``","x","``",")","and","must","be","broadcast","against","each","matrix",".","If","an","``","array","``",",","must","have","a","floating-point","data","type","and","must","be","compatible","with","``","shape","(","x",")","[",":","-2","]","``","(","see",":","ref",":","`","broadcasting","`",")",".","If","``","None","``",",","the","default","value","is","``","max","(","M",",","N",")","*","eps","``",",","where","``","eps","``","must","be","the","machine","epsilon","associated","with","the","floating-point","data","type","determined","by",":","ref",":","`","type-promotion","`","(","as","applied","to","``","x","``",")",".","Default",":","``","None","``",".","hermitian","indicates","whether","``","x","``","is","Hermitian",".","When","``","hermitian=True","``",",","``","x","``","is","assumed","to","be","Hermitian",",","enabling","a","more","efficient","method","for","finding","eigenvalues",",","but","x","is","not","checked","inside","the","function",".","Instead",",","We","just","use","the","lower","triangular","of","the","matrix","to","compute",".","Default",":","``","False","``",".","out","optional","output","array",",","for","writing","the","result","to",".","It","must","have","a","shape","that","the","inputs","broadcast","to",".","Returns","--","--","--","-","ret","a","container","containing","the","ranks",".","The","returned","array","must","have","a","floating-point","data","type","determined","by",":","ref",":","`","type-promotion","`","and","must","have","shape","``","(","...",")","``","(","i.e.",",","must","have","a","shape","equal","to","``","shape","(","x",")","[",":","-2","]","``",")",".","Examples","--","--","--","--","1",".","Full","Matrix",">",">",">","x","=","ivy.array","(","[","[","1.",",","2",".","]",",","[","3.",",","4",".","]","]",")",">",">",">","ivy.matrix_rank","(","x",")","ivy.array","(","2",".",")","2",".","Rank","Deficient","Matrix",">",">",">","x","=","ivy.array","(","[","[","1.",",","0",".","]",",","[","0.",",","0",".","]","]",")",">",">",">","ivy.matrix_rank","(","x",")","ivy.array","(","1",".",")","3",".","1","Dimension","-","rank","1","unless","all","0",">",">",">","x","=","ivy.array","(","[","[","1.",",","1",".","]",")",">",">",">","ivy.matrix_rank","(","x",")","ivy.array","(","1",".",")",">",">",">","x","=","ivy.array","(","[","[","0.",",","0",".","]",")",">",">",">","ivy.matrix_rank","(","x",")","ivy.array","(","0",")"]
code: def matrix_rank(
      self: ivy.Array,
      /,
      *,
      atol: Optional[Union[float, Tuple[float]]] = None,
      rtol: Optional[Union[float, Tuple[float]]] = None,
      hermitian: Optional[bool] = False,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """ivy.Array instance method variant of ivy.matrix_rank. This method
      returns the rank (i.e., number of non-zero singular values) of a matrix
      (or a stack of matrices).
  
      Parameters
      ----------
      self
          input array having shape ``(..., M, N)`` and whose innermost two dimensions
          form ``MxN`` matrices. Should have a floating-point data type.
  
      atol
          absolute tolerance. When None it’s considered to be zero.
  
      rtol
          relative tolerance for small singular values. Singular values approximately
          less than or equal to ``rtol * largest_singular_value`` are set to zero.
          If a ``float``, the value is equivalent to a zero-dimensional array having
          a floating-point data type determined by :ref:`type-promotion`
          (as applied to ``x``) and must be broadcast against each matrix.
          If an ``array``, must have a floating-point data type and must be
          compatible with ``shape(x)[:-2]`` (see :ref:`broadcasting`).
          If ``None``, the default value is ``max(M, N) * eps``, where ``eps`` must
          be the machine epsilon associated with the floating-point data type
          determined by :ref:`type-promotion` (as applied to ``x``).
          Default: ``None``.
  
      hermitian
          indicates whether ``x`` is Hermitian. When ``hermitian=True``, ``x`` is
          assumed to be Hermitian, enabling a more efficient method for finding
          eigenvalues, but x is not checked inside the function. Instead, We just use
          the lower triangular of the matrix to compute.
          Default: ``False``.
  
      out
          optional output array, for writing the result to. It must have a shape that
          the inputs broadcast to.
  
      Returns
      -------
      ret
          a container containing the ranks. The returned array must have a
          floating-point data type determined by :ref:`type-promotion` and
          must have shape ``(...)``
          (i.e., must have a shape equal to ``shape(x)[:-2]``).
  
      Examples
      --------
      1. Full Matrix
      >>> x = ivy.array([[1., 2.], [3., 4.]])
      >>> ivy.matrix_rank(x)
      ivy.array(2.)
  
      2. Rank Deficient Matrix
      >>> x = ivy.array([[1., 0.], [0., 0.]])
      >>> ivy.matrix_rank(x)
      ivy.array(1.)
  
      3. 1 Dimension - rank 1 unless all 0
      >>> x = ivy.array([[1., 1.])
      >>> ivy.matrix_rank(x)
      ivy.array(1.)
  
      >>> x = ivy.array([[0., 0.])
      >>> ivy.matrix_rank(x)
      ivy.array(0)
      """
      return ivy.matrix_rank(
          self._data, atol=atol, rtol=rtol, hermitian=hermitian, out=out
      )
  
imports: import abc
  from typing import Union, Optional, Literal, Tuple, List, Sequence
  import ivy
label_desc: Use image node_id 14 for calling the _ArrayWithLinearAlgebra obj's underlying member method code with example usage: obj.matrix_rank() and returns: ivy