class_docstr: Pullback metric.
  
  Let :math:`f` be an immersion :math:`f: M \rightarrow N`
  of one manifold :math:`M` into the Riemannian manifold :math:`N`
  with metric :math:`g`.
  The pull-back metric :math:`f^*g` is defined on :math:`M` for a
  base point :math:`p` as:
  :math:`(f^*g)_p(u, v) = g_{f(p)}(df_p u , df_p v)
  \quad \forall u, v \in T_pM`
  
  Note
  ----
  The pull-back metric is currently only implemented for an
  immersion into the Euclidean space, i.e. for
  
  :math:`N=\mathbb{R}^n`.
class_docstr_tok: ["Pullback","metric",".","Let",":","math",":","`","f","`","be","an","immersion",":","math",":","`","f",":","M","\\rightarrow","N","`","of","one","manifold",":","math",":","`","M","`","into","the","Riemannian","manifold",":","math",":","`","N","`","with","metric",":","math",":","`","g","`",".","The","pull-back","metric",":","math",":","`","f^","*","g","`","is","defined","on",":","math",":","`","M","`","for","a","base","point",":","math",":","`","p","`","as",":",":","math",":","`","(","f^","*","g",")","_p","(","u",",","v",")","=","g_","{","f","(","p",")","}","(","df_p","u",",","df_p","v",")","\\quad","\\forall","u",",","v","\\in","T_pM","`","Note","--","--","The","pull-back","metric","is","currently","only","implemented","for","an","immersion","into","the","Euclidean","space",",","i.e",".","for",":","math",":","`","N=\\mathbb","{","R","}","^n","`","."]
docstr: Metric matrix at the tangent space at a base point.
  
  Let :math:`f` be the immersion
  :math:`f: M \rightarrow \mathbb{R}^n` of the manifold
  :math:`M` into the Euclidean space :math:`\mathbb{R}^n`.
  The elements of the metric matrix at a base point :math:`p`
  are defined as:
  :math:`(f*g)_{ij}(p) = <df_p e_i , df_p e_j>`,
  for :math:`e_i, e_j` basis elements of :math:`M`.
  
  Parameters
  ----------
  base_point : array-like, shape=[..., dim]
      Base point.
      Optional, default: None.
  
  Returns
  -------
  mat : array-like, shape=[..., dim, dim]
      Inner-product matrix.
docstr_tok: ["Metric","matrix","at","the","tangent","space","at","a","base","point",".","Let",":","math",":","`","f","`","be","the","immersion",":","math",":","`","f",":","M","\\rightarrow","\\mathbb","{","R","}","^n","`","of","the","manifold",":","math",":","`","M","`","into","the","Euclidean","space",":","math",":","`","\\mathbb","{","R","}","^n","`",".","The","elements","of","the","metric","matrix","at","a","base","point",":","math",":","`","p","`","are","defined","as",":",":","math",":","`","(","f","*","g",")","_","{","ij","}","(","p",")","=","<","df_p","e_i",",","df_p","e_j",">","`",",","for",":","math",":","`","e_i",",","e_j","`","basis","elements","of",":","math",":","`","M","`",".","Parameters","--","--","--","--","--","base_point",":","array-like",",","shape=","[","...",",","dim","]","Base","point",".","Optional",",","default",":","None",".","Returns","--","--","--","-","mat",":","array-like",",","shape=","[","...",",","dim",",","dim","]","Inner-product","matrix","."]
code: def metric_matrix(self, base_point):
      r"""Metric matrix at the tangent space at a base point.
  
      Let :math:`f` be the immersion
      :math:`f: M \rightarrow \mathbb{R}^n` of the manifold
      :math:`M` into the Euclidean space :math:`\mathbb{R}^n`.
      The elements of the metric matrix at a base point :math:`p`
      are defined as:
      :math:`(f*g)_{ij}(p) = <df_p e_i , df_p e_j>`,
      for :math:`e_i, e_j` basis elements of :math:`M`.
  
      Parameters
      ----------
      base_point : array-like, shape=[..., dim]
          Base point.
          Optional, default: None.
  
      Returns
      -------
      mat : array-like, shape=[..., dim, dim]
          Inner-product matrix.
      """
      dim, dim_embedding = (
          self._space.dim,
          self._space.embedding_space.dim,
      )
      is_vec = check_is_batch(self._space.point_ndim, base_point)
  
      immersed_base_point = self._space.immersion(base_point)
      jacobian_immersion = self._space.jacobian_immersion(base_point)
  
      basis_elements = gs.eye(dim)
  
      if is_vec:
          reshaped_jacobian_immersion = gs.reshape(
              jacobian_immersion, (-1, dim)
          )
          reshaped_immersed_basis_elements = gs.matvec(
              reshaped_jacobian_immersion, basis_elements
          )
          immersed_basis_elements = gs.moveaxis(
              gs.reshape(
                  reshaped_immersed_basis_elements,
                  (dim, -1, dim_embedding),
              ),
              0,
              1,
          )
  
      else:
          immersed_basis_elements = gs.matvec(
              jacobian_immersion, basis_elements
          )
  
      elems = {}
      for i in range(dim):
          for j in range(i, dim):
              elem = self._space.embedding_space.metric.inner_product(
                  immersed_basis_elements[..., i, :],
                  immersed_basis_elements[..., j, :],
                  immersed_base_point,
              )
              elems[(i, j)] = elem
  
      mat = []
      for i in range(dim):
          for j in range(dim):
              elem = elems[(i, j)] if j > i else elems[(j, i)]
              mat.append(elem)
  
      shape = (-1, dim, dim) if is_vec else (dim, dim)
      return gs.reshape(gs.stack(mat, axis=-1), shape)
  
imports: import geomstats.backend
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.numerics.geodesic import ExpODESolver, LogShootingSolver
  from geomstats.numerics.ivp import GSIVPIntegrator
  from geomstats.vectorization import check_is_batch
label_desc: Use image node_id 3 for calling the PullbackMetric obj's underlying member method code with example usage: obj.metric_matrix(base_point) and returns: gs