class_docstr: Class for affine connections.
  
  Parameters
  ----------
  space : Manifold object
      M in the tuple (M, g).
class_docstr_tok: ["Class","for","affine","connections",".","Parameters","--","--","--","--","--","space",":","Manifold","object","M","in","the","tuple","(","M",",","g",")","."]
docstr: Generate parameterized function for the geodesic curve.
  
  Parameters
  ----------
  initial_point : array-like, shape=[..., dim]
      Point on the manifold, initial point of the geodesic.
  initial_tangent_vec : array-like, shape=[..., dim],
      Tangent vector at base point, the initial speed of the geodesics.
      Optional, default: None.
      If None, an end point must be given and a logarithm is computed.
  
  Returns
  -------
  path : callable
      Time parameterized geodesic curve. If a batch of initial
      conditions is passed, the output array's first dimension
      represents the different initial conditions, and the second
      corresponds to time.
docstr_tok: ["Generate","parameterized","function","for","the","geodesic","curve",".","Parameters","--","--","--","--","--","initial_point",":","array-like",",","shape=","[","...",",","dim","]","Point","on","the","manifold",",","initial","point","of","the","geodesic",".","initial_tangent_vec",":","array-like",",","shape=","[","...",",","dim","]",",","Tangent","vector","at","base","point",",","the","initial","speed","of","the","geodesics",".","Optional",",","default",":","None",".","If","None",",","an","end","point","must","be","given","and","a","logarithm","is","computed",".","Returns","--","--","--","-","path",":","callable","Time","parameterized","geodesic","curve",".","If","a","batch","of","initial","conditions","is","passed",",","the","output","array","'s","first","dimension","represents","the","different","initial","conditions",",","and","the","second","corresponds","to","time","."]
code: def _geodesic_from_exp(self, initial_point, initial_tangent_vec):
      """Generate parameterized function for the geodesic curve.
  
      Parameters
      ----------
      initial_point : array-like, shape=[..., dim]
          Point on the manifold, initial point of the geodesic.
      initial_tangent_vec : array-like, shape=[..., dim],
          Tangent vector at base point, the initial speed of the geodesics.
          Optional, default: None.
          If None, an end point must be given and a logarithm is computed.
  
      Returns
      -------
      path : callable
          Time parameterized geodesic curve. If a batch of initial
          conditions is passed, the output array's first dimension
          represents the different initial conditions, and the second
          corresponds to time.
      """
      ndim = self._space.point_ndim
      ijk = "ijk"[: self._space.point_ndim]
  
      multiple_tangent = initial_tangent_vec.ndim > ndim
      multiple_point = initial_point.ndim > ndim
      is_batch = multiple_tangent or multiple_point
  
      def path(t):
          """Generate parameterized function for geodesic curve.
  
          Parameters
          ----------
          t : array-like, shape=[n_points,]
              Times at which to compute points of the geodesics.
          """
          t = gs.array(t)
          t = gs.cast(t, initial_tangent_vec.dtype)
          t = gs.to_ndarray(t, to_ndim=1)
  
          tangent_vecs = gs.einsum(
              f"n,...{ijk}->...n{ijk}", t, initial_tangent_vec
          )
          if is_batch:
              if multiple_point and multiple_tangent:
                  points_at_time_t = [
                      self.exp(tv, pt)
                      for tv, pt in zip(tangent_vecs, initial_point)
                  ]
  
              elif multiple_point:
                  points_at_time_t = [
                      self.exp(tangent_vecs, pt) for pt in initial_point
                  ]
  
              elif multiple_tangent:
                  points_at_time_t = [
                      self.exp(tv, initial_point) for tv in tangent_vecs
                  ]
  
              return gs.stack(points_at_time_t, axis=0)
  
          return self.exp(tangent_vecs, initial_point)
  
      return path
  
imports: from abc import ABC
  import geomstats.backend
  import geomstats.errors
label_desc: Use image node_id 15 for calling the Connection obj's underlying member method code with example usage: obj._geodesic_from_exp(initial_point, initial_tangent_vec) and returns: path, self, gs