class_docstr: Class for Riemannian and pseudo-Riemannian metrics.
  
  The associated Levi-Civita connection on the tangent bundle.
class_docstr_tok: ["Class","for","Riemannian","and","pseudo-Riemannian","metrics",".","The","associated","Levi-Civita","connection","on","the","tangent","bundle","."]
docstr: Closest neighbor of point among neighbors.
  
  Parameters
  ----------
  point : array-like, shape=[..., dim]
      Point.
  neighbors : array-like, shape=[n_neighbors, dim]
      Neighbors.
  
  Returns
  -------
  closest_neighbor_index : int
      Index of closest neighbor.
docstr_tok: ["Closest","neighbor","of","point","among","neighbors",".","Parameters","--","--","--","--","--","point",":","array-like",",","shape=","[","...",",","dim","]","Point",".","neighbors",":","array-like",",","shape=","[","n_neighbors",",","dim","]","Neighbors",".","Returns","--","--","--","-","closest_neighbor_index",":","int","Index","of","closest","neighbor","."]
code: def closest_neighbor_index(self, point, neighbors):
      """Closest neighbor of point among neighbors.
  
      Parameters
      ----------
      point : array-like, shape=[..., dim]
          Point.
      neighbors : array-like, shape=[n_neighbors, dim]
          Neighbors.
  
      Returns
      -------
      closest_neighbor_index : int
          Index of closest neighbor.
      """
      n_points = (
          point.shape[0] if gs.ndim(point) == gs.ndim(neighbors) else 1
      )
      n_neighbors = neighbors.shape[0]
  
      if n_points > 1 and n_neighbors > 1:
          neighbors = gs.repeat(neighbors, n_points, axis=0)
  
          point = gs.concatenate([point for _ in range(n_neighbors)])
  
      closest_neighbor_index = gs.argmin(
          gs.transpose(
              gs.reshape(
                  self.dist(point, neighbors), (n_neighbors, n_points)
              ),
          ),
          axis=1,
      )
  
      if n_points == 1:
          return closest_neighbor_index[0]
  
      return closest_neighbor_index
  
imports: from abc import ABC
  import joblib
  import geomstats.backend
  import geomstats.geometry
  from geomstats.geometry.connection import Connection
  from geomstats.vectorization import check_is_batch
label_desc: Use image node_id 20 for calling the RiemannianMetric obj's underlying member method code with example usage: obj.closest_neighbor_index(point, neighbors) and returns: closest_neighbor_index, closest_neighbor_index