class_docstr: Canonical metric of the Grassmann manifold.
  
  Coincides with the Frobenius metric.
docstr: Compute the 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)`.
  
  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 Grassmann manifold. Point to transport from.
  direction : array-like, shape=[..., n, n]
      Tangent vector at base point, along which the parallel transport
      is computed.
      Optional, default: None
  end_point : array-like, shape=[..., n, n]
      Point on the Grassmann manifold to transport to. Unused if
      `direction` is given.
      Optional, default: None
  
  Returns
  -------
  transported_tangent_vec: array-like, shape=[..., n, n]
      Transported tangent vector at `exp_(base_point)(direction)`.
  
  References
  ----------
  .. [BZA20]  Bendokat, Thomas, Ralf Zimmermann, and P.-A. Absil.
      “A Grassmann Manifold Handbook: Basic Geometry and Computational
      Aspects.” ArXiv:2011.13699 [Cs, Math], November 27, 2020.
      https://arxiv.org/abs/2011.13699.
docstr_tok: ["Compute","the","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",")","`",".","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","Grassmann","manifold",".","Point","to","transport","from",".","direction",":","array-like",",","shape=","[","...",",","n",",","n","]","Tangent","vector","at","base","point",",","along","which","the","parallel","transport","is","computed",".","Optional",",","default",":","None","end_point",":","array-like",",","shape=","[","...",",","n",",","n","]","Point","on","the","Grassmann","manifold","to","transport","to",".","Unused","if","`","direction","`","is","given",".","Optional",",","default",":","None","Returns","--","--","--","-","transported_tangent_vec",":","array-like",",","shape=","[","...",",","n",",","n","]","Transported","tangent","vector","at","`","exp_","(","base_point",")","(","direction",")","`",".","References","--","--","--","--","--","..","[","BZA20","]","Bendokat",",","Thomas",",","Ralf","Zimmermann",",","and","P.-A",".","Absil",".","\u201c","A","Grassmann","Manifold","Handbook",":","Basic","Geometry","and","Computational","Aspects.","\u201d","ArXiv:2011.13699","[","Cs",",","Math","]",",","November","27",",","2020.","https",":","\/\/arxiv.org\/abs\/2011.13699","."]
code: def parallel_transport(
      self, tangent_vec, base_point, direction=None, end_point=None
  ):
      r"""Compute the 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)`.
  
      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 Grassmann manifold. Point to transport from.
      direction : array-like, shape=[..., n, n]
          Tangent vector at base point, along which the parallel transport
          is computed.
          Optional, default: None
      end_point : array-like, shape=[..., n, n]
          Point on the Grassmann manifold to transport to. Unused if
          `direction` is given.
          Optional, default: None
  
      Returns
      -------
      transported_tangent_vec: array-like, shape=[..., n, n]
          Transported tangent vector at `exp_(base_point)(direction)`.
  
      References
      ----------
      .. [BZA20]  Bendokat, Thomas, Ralf Zimmermann, and P.-A. Absil.
          “A Grassmann Manifold Handbook: Basic Geometry and Computational
          Aspects.” ArXiv:2011.13699 [Cs, Math], November 27, 2020.
          https://arxiv.org/abs/2011.13699.
      """
      if direction is None:
          if end_point is not None:
              direction = self.log(end_point, base_point)
          else:
              raise ValueError(
                  "Either an end_point or a direction must be given to define the"
                  " geodesic along which to transport."
              )
      expm = gs.linalg.expm
      mul = Matrices.mul
      rot = -Matrices.bracket(base_point, direction)
      return mul(expm(rot), tangent_vec, expm(-rot))
  
imports: import geomstats.backend
  import geomstats.errors
  from geomstats.geometry.base import LevelSet
  from geomstats.geometry.general_linear import GeneralLinear
  from geomstats.geometry.matrices import Matrices, MatricesMetric
  from geomstats.geometry.symmetric_matrices import SymmetricMatrices
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 4 for calling the GrassmannianCanonicalMetric obj's underlying member method code with example usage: obj.parallel_transport(tangent_vec, base_point, direction, end_point) and returns: mul