class_docstr: Class for an n-fold product manifold :math:`M^n`.
  
  Define a manifold as the product manifold of n copies of a given base
  manifold M.
  
  Parameters
  ----------
  space : NFoldManifold
      Base space.
  scales : array-like
      Scale of each metric in the product.
docstr: Compute the matrix of the inner-product.
  
  Matrix of the inner-product defined by the Riemmanian metric
  at point base_point of the manifold.
  
  Parameters
  ----------
  base_point : array-like, shape=[..., n_copies, *base_shape]
      Point on the manifold at which to compute the inner-product matrix.
  
  Returns
  -------
  matrix : array-like, shape=[..., n_copies, dim, dim]
      Matrix of the inner-product at the base point.
docstr_tok: ["Compute","the","matrix","of","the","inner-product",".","Matrix","of","the","inner-product","defined","by","the","Riemmanian","metric","at","point","base_point","of","the","manifold",".","Parameters","--","--","--","--","--","base_point",":","array-like",",","shape=","[","...",",","n_copies",",","*","base_shape","]","Point","on","the","manifold","at","which","to","compute","the","inner-product","matrix",".","Returns","--","--","--","-","matrix",":","array-like",",","shape=","[","...",",","n_copies",",","dim",",","dim","]","Matrix","of","the","inner-product","at","the","base","point","."]
code: def metric_matrix(self, base_point):
      """Compute the matrix of the inner-product.
  
      Matrix of the inner-product defined by the Riemmanian metric
      at point base_point of the manifold.
  
      Parameters
      ----------
      base_point : array-like, shape=[..., n_copies, *base_shape]
          Point on the manifold at which to compute the inner-product matrix.
  
      Returns
      -------
      matrix : array-like, shape=[..., n_copies, dim, dim]
          Matrix of the inner-product at the base point.
      """
      base_manifold = self._space.base_manifold
      batch_shape = get_batch_shape(self._space.point_ndim, base_point)
  
      point_ = gs.reshape(base_point, (-1, *base_manifold.shape))
      matrices = base_manifold.metric.metric_matrix(point_)
  
      dim = base_manifold.shape[-1]
      reshaped = gs.reshape(
          matrices, batch_shape + (self._space.n_copies, dim, dim)
      )
  
      if self.scales is not None:
          reshaped = gs.einsum(
              "j,...jkl->...jkl", self.scales, reshaped
          )
  
      return reshaped
  
imports: import geomstats.backend
  import geomstats.errors
  from geomstats.geometry.manifold import Manifold
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.vectorization import get_batch_shape
label_desc: Use image node_id 2 for calling the NFoldMetric obj's underlying member method code with example usage: obj.metric_matrix(base_point) and returns: reshaped