code: def matrix_rank(x, /, *, rtol=None):
      """
      Returns the rank (i.e., number of non-zero singular values) of a matrix (or a stack of matrices).
      """
      return jax.numpy.linalg.matrix_rank(x, tol=rtol)
  
imports: from functools import partial
  from typing import NamedTuple
  import jax
  from jax.experimental.array_api._data_type_functions import _promote_to_default_dtype
label_desc: Use image node_id 11 for calling a global function with example usage: matrix_rank() and returns: jax