class_docstr: Class for affine connections.
  
  Parameters
  ----------
  space : Manifold object
      M in the tuple (M, g).
class_docstr_tok: ["Class","for","affine","connections",".","Parameters","--","--","--","--","--","space",":","Manifold","object","M","in","the","tuple","(","M",",","g",")","."]
docstr: Compute Riemannian tensor at base_point.
  
  In the literature the Riemannian curvature tensor is noted :math:`R_{ijk}^l`.
  
  Following tensor index convention (ref. Wikipedia), we have:
  :math:`R_{ijk}^l = dx^l(R(X_j, X_k)X_i)`
  
  which gives :math:`R_{ijk}^l` as a sum of four terms:
  
  .. math::
      \partial_j \Gamma^l_{ki} - \partial_k \Gamma^l_{ji}
      + \Gamma^l_{jm} \Gamma^m_{ki} - \Gamma^l_{km} \Gamma^m_{ji}
  
  Note that geomstats puts the contravariant index on
  the first dimension of the Christoffel symbols.
  
  Parameters
  ----------
  base_point : array-like, shape=[..., dim]
      Point on the manifold.
  
  Returns
  -------
  riemann_curvature : array-like, shape=[..., dim, dim, dim, dim]
      riemann_tensor[...,i,j,k,l] = R_{ijk}^l
      Riemannian tensor curvature,
      with the contravariant index on the last dimension.
docstr_tok: ["Compute","Riemannian","tensor","at","base_point",".","In","the","literature","the","Riemannian","curvature","tensor","is","noted",":","math",":","`","R_","{","ijk","}","^l","`",".","Following","tensor","index","convention","(","ref",".","Wikipedia",")",",","we","have",":",":","math",":","`","R_","{","ijk","}","^l","=","dx^l","(","R","(","X_j",",","X_k",")","X_i",")","`","which","gives",":","math",":","`","R_","{","ijk","}","^l","`","as","a","sum","of","four","terms",":","..","math",":",":","\\partial_j","\\Gamma^l_","{","ki","}","-","\\partial_k","\\Gamma^l_","{","ji","}","+","\\Gamma^l_","{","jm","}","\\Gamma^m_","{","ki","}","-","\\Gamma^l_","{","km","}","\\Gamma^m_","{","ji","}","Note","that","geomstats","puts","the","contravariant","index","on","the","first","dimension","of","the","Christoffel","symbols",".","Parameters","--","--","--","--","--","base_point",":","array-like",",","shape=","[","...",",","dim","]","Point","on","the","manifold",".","Returns","--","--","--","-","riemann_curvature",":","array-like",",","shape=","[","...",",","dim",",","dim",",","dim",",","dim","]","riemann_tensor","[","...",",","i",",","j",",","k",",","l","]","=","R_","{","ijk","}","^l","Riemannian","tensor","curvature",",","with","the","contravariant","index","on","the","last","dimension","."]
code: def riemann_tensor(self, base_point):
      r"""Compute Riemannian tensor at base_point.
  
      In the literature the Riemannian curvature tensor is noted :math:`R_{ijk}^l`.
  
      Following tensor index convention (ref. Wikipedia), we have:
      :math:`R_{ijk}^l = dx^l(R(X_j, X_k)X_i)`
  
      which gives :math:`R_{ijk}^l` as a sum of four terms:
  
      .. math::
          \partial_j \Gamma^l_{ki} - \partial_k \Gamma^l_{ji}
          + \Gamma^l_{jm} \Gamma^m_{ki} - \Gamma^l_{km} \Gamma^m_{ji}
  
      Note that geomstats puts the contravariant index on
      the first dimension of the Christoffel symbols.
  
      Parameters
      ----------
      base_point : array-like, shape=[..., dim]
          Point on the manifold.
  
      Returns
      -------
      riemann_curvature : array-like, shape=[..., dim, dim, dim, dim]
          riemann_tensor[...,i,j,k,l] = R_{ijk}^l
          Riemannian tensor curvature,
          with the contravariant index on the last dimension.
      """
      if len(self._space.shape) > 1:
          raise NotImplementedError(
              "Riemann tensor not implemented for manifolds with points of ndim > 1."
          )
      christoffels = self.christoffels(base_point)
      jacobian_christoffels = gs.autodiff.jacobian_vec(
          self.christoffels
      )(base_point)
  
      prod_christoffels = gs.einsum(
          "...ijk,...klm->...ijlm", christoffels, christoffels
      )
      riemann_curvature = (
          gs.einsum("...ijlm->...lmji", jacobian_christoffels)
          - gs.einsum("...ijlm->...ljmi", jacobian_christoffels)
          + gs.einsum("...ijlm->...mjli", prod_christoffels)
          - gs.einsum("...ijlm->...lmji", prod_christoffels)
      )
  
      return riemann_curvature
  
imports: from abc import ABC
  import geomstats.backend
  import geomstats.errors
label_desc: Use image node_id 9 for calling the Connection obj's underlying member method code with example usage: obj.riemann_tensor(base_point) and returns: riemann_curvature