class_docstr: Class for the n-dimensional hyperbolic space.
  
  Common class for the n-dimensional hyperbolic space regardless the
  representation being used. This class gathers the change of coordinate
  methods that are common to all representations.
  
  This class cannot be instantiated in itself, but a public class
  `Hyperbolic` is available, that returns the class that corresponds to the
  chosen representation: Hyperboloid, Poincare Ball or Poincare Half-space.
class_docstr_tok: ["Class","for","the","n-dimensional","hyperbolic","space",".","Common","class","for","the","n-dimensional","hyperbolic","space","regardless","the","representation","being","used",".","This","class","gathers","the","change","of","coordinate","methods","that","are","common","to","all","representations",".","This","class","can","not","be","instantiated","in","itself",",","but","a","public","class","`","Hyperbolic","`","is","available",",","that","returns","the","class","that","corresponds","to","the","chosen","representation",":","Hyperboloid",",","Poincare","Ball","or","Poincare","Half-space","."]
docstr: Convert ball to half-space tangent coordinates.
  
  Convert the parameterization of a tangent vector to the
  hyperbolic space from its Poincare ball coordinates, to
  the Poinare half-space coordinates.
  
  Parameters
  ----------
  tangent_vec : array-like, shape=[..., dim]
      Tangent vector at the base point in the Poincare ball.
  base_point : array-like, shape=[..., dim]
      Point in the Poincare ball.
  
  Returns
  -------
  tangent_vec_half_spacel : array-like, shape=[..., dim]
      Tangent vector in the Poincare half-space.
docstr_tok: ["Convert","ball","to","half-space","tangent","coordinates",".","Convert","the","parameterization","of","a","tangent","vector","to","the","hyperbolic","space","from","its","Poincare","ball","coordinates",",","to","the","Poinare","half-space","coordinates",".","Parameters","--","--","--","--","--","tangent_vec",":","array-like",",","shape=","[","...",",","dim","]","Tangent","vector","at","the","base","point","in","the","Poincare","ball",".","base_point",":","array-like",",","shape=","[","...",",","dim","]","Point","in","the","Poincare","ball",".","Returns","--","--","--","-","tangent_vec_half_spacel",":","array-like",",","shape=","[","...",",","dim","]","Tangent","vector","in","the","Poincare","half-space","."]
code: def ball_to_half_space_tangent(tangent_vec, base_point):
      """Convert ball to half-space tangent coordinates.
  
      Convert the parameterization of a tangent vector to the
      hyperbolic space from its Poincare ball coordinates, to
      the Poinare half-space coordinates.
  
      Parameters
      ----------
      tangent_vec : array-like, shape=[..., dim]
          Tangent vector at the base point in the Poincare ball.
      base_point : array-like, shape=[..., dim]
          Point in the Poincare ball.
  
      Returns
      -------
      tangent_vec_half_spacel : array-like, shape=[..., dim]
          Tangent vector in the Poincare half-space.
  
      """
      sq_norm = gs.sum(base_point**2, axis=-1)
      den = 1 + sq_norm - 2 * base_point[..., -1]
      scalar_prod = gs.sum(base_point * tangent_vec, -1)
      component_1 = gs.einsum(
          "...i,...->...i", tangent_vec[..., :-1], 2.0 / den
      ) - 4.0 * gs.einsum(
          "...i,...->...i",
          base_point[..., :-1],
          (scalar_prod - tangent_vec[..., -1]) / den**2,
      )
      component_2 = (
          -2.0 * scalar_prod / den
          - 2
          * (1.0 - sq_norm)
          * (scalar_prod - tangent_vec[..., -1])
          / den**2
      )
      tangent_vec_half_space = gs.concatenate(
          [component_1, component_2[..., None]], axis=-1
      )
  
      return tangent_vec_half_space
  
file_path: geomstats/geomstats/geometry/_hyperbolic.py
imports: import geomstats.backend
  from geomstats.geometry.riemannian_metric import RiemannianMetric
label_desc: Use image node_id 10 for calling the _Hyperbolic obj's underlying member method code with example usage: obj.ball_to_half_space_tangent(tangent_vec, base_point) and returns: tangent_vec_half_space