class_docstr: Class that defines the canonical metric for Stiefel manifolds.
docstr: Compute the Riemannian exponential of a tangent vector.
  
  Parameters
  ----------
  tangent_vec : array-like, shape=[..., n, p]
      Tangent vector at a base point.
  base_point : array-like, shape=[..., n, p]
      Point in the Stiefel manifold.
  
  Returns
  -------
  exp : array-like, shape=[..., n, p]
      Point in the Stiefel manifold equal to the Riemannian exponential
      of tangent_vec at the base point.
code: def exp(self, tangent_vec, base_point):
      """Compute the Riemannian exponential of a tangent vector.
  
      Parameters
      ----------
      tangent_vec : array-like, shape=[..., n, p]
          Tangent vector at a base point.
      base_point : array-like, shape=[..., n, p]
          Point in the Stiefel manifold.
  
      Returns
      -------
      exp : array-like, shape=[..., n, p]
          Point in the Stiefel manifold equal to the Riemannian exponential
          of tangent_vec at the base point.
      """
      p = self._space.p
      matrix_a = Matrices.mul(
          Matrices.transpose(base_point), tangent_vec
      )
      matrix_k = tangent_vec - Matrices.mul(base_point, matrix_a)
  
      matrix_q, matrix_r = gs.linalg.qr(matrix_k)
  
      matrix_ar = gs.concatenate(
          [matrix_a, -Matrices.transpose(matrix_r)], axis=-1
      )
  
      zeros = gs.zeros_like(tangent_vec)[..., :p, :p]
      matrix_rz = gs.concatenate([matrix_r, zeros], axis=-1)
      block = gs.concatenate([matrix_ar, matrix_rz], axis=-2)
      matrix_mn_e = gs.linalg.expm(block)
  
      exp = Matrices.mul(
          base_point, matrix_mn_e[..., :p, :p]
      ) + Matrices.mul(matrix_q, matrix_mn_e[..., p:, :p])
      return exp
  
imports: import warnings
  import geomstats.backend
  import geomstats.errors
  from geomstats import algebra_utils
  from geomstats.geometry.base import LevelSet
  from geomstats.geometry.hermitian_matrices import powermh
  from geomstats.geometry.matrices import Matrices
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 3 for calling the StiefelCanonicalMetric obj's underlying member method code with example usage: obj.exp(tangent_vec, base_point) and returns: exp