class_docstr: Class that defines the canonical metric for Stiefel manifolds.
docstr: Compute the inner-product of two tangent vectors at a base point.
  
  Canonical inner-product on the tangent space at `base_point`,
  which is different from the inner-product induced by the embedding
  (see [RLSMRZ2017]_).
  
  .. math::
  
      \langle\Delta, \tilde{\Delta}\rangle_{U}=\operatorname{tr}
      \left(\Delta^{T}\left(I-\frac{1}{2} U U^{T}\right)
      \tilde{\Delta}\right)
  
  References
  ----------
  .. [RLSMRZ2017] R Zimmermann. A matrix-algebraic algorithm for the
      Riemannian logarithm on the Stiefel manifold under the canonical
      metric. SIAM Journal on Matrix Analysis and Applications 38 (2),
      322-342, 2017. https://epubs.siam.org/doi/pdf/10.1137/16M1074485
  
  Parameters
  ----------
  tangent_vec_a : array-like, shape=[..., n, p]
      First tangent vector at base point.
  tangent_vec_b : array-like, shape=[..., n, p]
      Second tangent vector at base point.
  base_point : array-like, shape=[..., n, p]
      Point in the Stiefel manifold.
  
  Returns
  -------
  inner_prod : array-like, shape=[..., 1]
      Inner-product of the two tangent vectors.
code: def inner_product(self, tangent_vec_a, tangent_vec_b, base_point):
      r"""Compute the inner-product of two tangent vectors at a base point.
  
      Canonical inner-product on the tangent space at `base_point`,
      which is different from the inner-product induced by the embedding
      (see [RLSMRZ2017]_).
  
      .. math::
  
          \langle\Delta, \tilde{\Delta}\rangle_{U}=\operatorname{tr}
          \left(\Delta^{T}\left(I-\frac{1}{2} U U^{T}\right)
          \tilde{\Delta}\right)
  
      References
      ----------
      .. [RLSMRZ2017] R Zimmermann. A matrix-algebraic algorithm for the
          Riemannian logarithm on the Stiefel manifold under the canonical
          metric. SIAM Journal on Matrix Analysis and Applications 38 (2),
          322-342, 2017. https://epubs.siam.org/doi/pdf/10.1137/16M1074485
  
      Parameters
      ----------
      tangent_vec_a : array-like, shape=[..., n, p]
          First tangent vector at base point.
      tangent_vec_b : array-like, shape=[..., n, p]
          Second tangent vector at base point.
      base_point : array-like, shape=[..., n, p]
          Point in the Stiefel manifold.
  
      Returns
      -------
      inner_prod : array-like, shape=[..., 1]
          Inner-product of the two tangent vectors.
      """
      base_point_transpose = Matrices.transpose(base_point)
  
      aux = gs.matmul(
          Matrices.transpose(tangent_vec_a),
          gs.eye(self._space.n)
          - 0.5 * gs.matmul(base_point, base_point_transpose),
      )
      return Matrices.trace_product(aux, tangent_vec_b)
  
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 2 for calling the StiefelCanonicalMetric obj's underlying member method code with example usage: obj.inner_product(tangent_vec_a, tangent_vec_b, base_point) and returns: Matrices