class_docstr: Class that defines operations using a Poincare ball.
class_docstr_tok: ["Class","that","defines","operations","using","a","Poincare","ball","."]
docstr: Compute the Riemannian exponential of a tangent vector.
  
  Parameters
  ----------
  tangent_vec : array-like, shape=[..., dim]
      Tangent vector at a base point.
  base_point : array-like, shape=[..., dim]
      Point in the Poincare ball.
  
  Returns
  -------
  exp : array-like, shape=[..., dim]
      Point in the Poincare ball equal to the Riemannian exponential
      of tangent_vec at the base point.
docstr_tok: ["Compute","the","Riemannian","exponential","of","a","tangent","vector",".","Parameters","--","--","--","--","--","tangent_vec",":","array-like",",","shape=","[","...",",","dim","]","Tangent","vector","at","a","base","point",".","base_point",":","array-like",",","shape=","[","...",",","dim","]","Point","in","the","Poincare","ball",".","Returns","--","--","--","-","exp",":","array-like",",","shape=","[","...",",","dim","]","Point","in","the","Poincare","ball","equal","to","the","Riemannian","exponential","of","tangent_vec","at","the","base","point","."]
code: def exp(self, tangent_vec, base_point, **kwargs):
      """Compute the Riemannian exponential of a tangent vector.
  
      Parameters
      ----------
      tangent_vec : array-like, shape=[..., dim]
          Tangent vector at a base point.
      base_point : array-like, shape=[..., dim]
          Point in the Poincare ball.
  
      Returns
      -------
      exp : array-like, shape=[..., dim]
          Point in the Poincare ball equal to the Riemannian exponential
          of tangent_vec at the base point.
      """
      squared_norm_bp = gs.sum(base_point**2, axis=-1)
      norm_tan = gs.linalg.norm(tangent_vec, axis=-1)
      lambda_base_point = 1 / (1 - squared_norm_bp)
  
      # This avoids dividing by 0
      norm_tan_eps = gs.where(
          gs.isclose(norm_tan, 0.0), EPSILON, norm_tan
      )
      direction = gs.einsum(
          "...i,...->...i", tangent_vec, 1 / norm_tan_eps
      )
  
      factor = gs.tanh(lambda_base_point * norm_tan)
  
      return self.mobius_add(
          base_point, gs.einsum("...,...i->...i", factor, direction)
      )
  
imports: import math
  import geomstats.algebra_utils
  import geomstats.backend
  from geomstats.geometry._hyperbolic import _Hyperbolic
  from geomstats.geometry.base import VectorSpaceOpenSet
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 1 for calling the PoincareBallMetric obj's underlying member method code with example usage: obj.exp(tangent_vec, base_point) and returns: self