class_docstr: Class for the affine-invariant metric on the HPD manifold.
docstr: Parallel transport of a tangent vector.
  
  Closed-form solution for the parallel transport of a tangent vector
  along the geodesic between two points `base_point` and `end_point`
  or alternatively defined by :math:`t \mapsto exp_{(base\_point)}(
  t*direction)`.
  Denoting `tangent_vec_a` by `S`, `base_point` by `A`, and `end_point`
  by `B` or `B = Exp_A(tangent_vec_b)` and :math:`E = (BA^{- 1})^{( 1
  / 2)}`. Then the parallel transport to `B` is:
  
  .. math::
      S' = ESE^T
  
  Parameters
  ----------
  tangent_vec : array-like, shape=[..., n, n]
      Tangent vector at base point to be transported.
  base_point : array-like, shape=[..., n, n]
      Point on the manifold of HPD matrices. Point to transport from
  direction : array-like, shape=[..., n, n]
      Tangent vector at base point, initial speed of the geodesic along
      which the parallel transport is computed. Unused if `end_point` is given.
      Optional, default: None.
  end_point : array-like, shape=[..., n, n]
      Point on the manifold of HPD matrices. Point to transport to.
      Optional, default: None.
  
  Returns
  -------
  transported_tangent_vec: array-like, shape=[..., n, n]
      Transported tangent vector at exp_(base_point)(tangent_vec_b).
docstr_tok: ["Parallel","transport","of","a","tangent","vector",".","Closed-form","solution","for","the","parallel","transport","of","a","tangent","vector","along","the","geodesic","between","two","points","`","base_point","`","and","`","end_point","`","or","alternatively","defined","by",":","math",":","`","t","\\mapsto","exp_","{","(","base\\_point",")","}","(","t","*","direction",")","`",".","Denoting","`","tangent_vec_a","`","by","`","S","`",",","`","base_point","`","by","`","A","`",",","and","`","end_point","`","by","`","B","`","or","`","B","=","Exp_A","(","tangent_vec_b",")","`","and",":","math",":","`","E","=","(","BA^","{","-","1","}",")","^","{","(","1","\/","2",")","}","`",".","Then","the","parallel","transport","to","`","B","`","is",":","..","math",":",":","S","'","=","ESE^T","Parameters","--","--","--","--","--","tangent_vec",":","array-like",",","shape=","[","...",",","n",",","n","]","Tangent","vector","at","base","point","to","be","transported",".","base_point",":","array-like",",","shape=","[","...",",","n",",","n","]","Point","on","the","manifold","of","HPD","matrices",".","Point","to","transport","from","direction",":","array-like",",","shape=","[","...",",","n",",","n","]","Tangent","vector","at","base","point",",","initial","speed","of","the","geodesic","along","which","the","parallel","transport","is","computed",".","Unused","if","`","end_point","`","is","given",".","Optional",",","default",":","None",".","end_point",":","array-like",",","shape=","[","...",",","n",",","n","]","Point","on","the","manifold","of","HPD","matrices",".","Point","to","transport","to",".","Optional",",","default",":","None",".","Returns","--","--","--","-","transported_tangent_vec",":","array-like",",","shape=","[","...",",","n",",","n","]","Transported","tangent","vector","at","exp_","(","base_point",")","(","tangent_vec_b",")","."]
code: def parallel_transport(
      self, tangent_vec, base_point, direction=None, end_point=None
  ):
      r"""Parallel transport of a tangent vector.
  
      Closed-form solution for the parallel transport of a tangent vector
      along the geodesic between two points `base_point` and `end_point`
      or alternatively defined by :math:`t \mapsto exp_{(base\_point)}(
      t*direction)`.
      Denoting `tangent_vec_a` by `S`, `base_point` by `A`, and `end_point`
      by `B` or `B = Exp_A(tangent_vec_b)` and :math:`E = (BA^{- 1})^{( 1
      / 2)}`. Then the parallel transport to `B` is:
  
      .. math::
          S' = ESE^T
  
      Parameters
      ----------
      tangent_vec : array-like, shape=[..., n, n]
          Tangent vector at base point to be transported.
      base_point : array-like, shape=[..., n, n]
          Point on the manifold of HPD matrices. Point to transport from
      direction : array-like, shape=[..., n, n]
          Tangent vector at base point, initial speed of the geodesic along
          which the parallel transport is computed. Unused if `end_point` is given.
          Optional, default: None.
      end_point : array-like, shape=[..., n, n]
          Point on the manifold of HPD matrices. Point to transport to.
          Optional, default: None.
  
      Returns
      -------
      transported_tangent_vec: array-like, shape=[..., n, n]
          Transported tangent vector at exp_(base_point)(tangent_vec_b).
      """
      if end_point is None:
          end_point = self.exp(direction, base_point)
      sqrt_bp, inv_sqrt_bp = powermh(base_point, [1.0 / 2, -1.0 / 2])
      pdt = powermh(
          Matrices.mul(inv_sqrt_bp, end_point, inv_sqrt_bp), 1.0 / 2
      )
      congruence_mat = Matrices.mul(sqrt_bp, pdt, inv_sqrt_bp)
      return ComplexMatrices.congruent(tangent_vec, congruence_mat)
  
imports: import math
  import geomstats.backend
  from geomstats.geometry.base import ComplexVectorSpaceOpenSet
  from geomstats.geometry.complex_matrices import ComplexMatrices, ComplexMatricesMetric
  from geomstats.geometry.complex_riemannian_metric import ComplexRiemannianMetric
  from geomstats.geometry.general_linear import GeneralLinear
  from geomstats.geometry.hermitian_matrices import HermitianMatrices, expmh, powermh
  from geomstats.geometry.matrices import Matrices
  from geomstats.geometry.pullback_metric import PullbackDiffeoMetric
  from geomstats.geometry.spd_matrices import SymMatrixLog, logmh
  from geomstats.integrator import integrate
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 4 for calling the HPDAffineMetric obj's underlying member method code with example usage: obj.parallel_transport(tangent_vec, base_point, direction, end_point) and returns: ComplexMatrices