class_docstr: Class for the Bures-Wasserstein metric on the HPD manifold.
docstr: Compute the Bures-Wasserstein inner-product.
  
  Compute the inner-product of tangent_vec_a :math:`A` and tangent_vec_b
  :math:`B` at point base_point :math:`S=PDP^\top` using the
  Bures-Wasserstein Riemannian metric:
  
  .. math::
      \frac{1}{2}\sum_{i,j}\frac{[P^\top AP]_{ij}[P^\top BP]_{ij}}{d_i+d_j}
  
  Parameters
  ----------
  tangent_vec_a : array-like, shape=[..., n, n]
      Tangent vector at base point.
  tangent_vec_b : array-like, shape=[..., n, n]
      Tangent vector at base point.
  base_point : array-like, shape=[..., n, n]
      Base point.
  
  Returns
  -------
  inner_product : array-like, shape=[...,]
      Inner-product.
docstr_tok: ["Compute","the","Bures-Wasserstein","inner-product",".","Compute","the","inner-product","of","tangent_vec_a",":","math",":","`","A","`","and","tangent_vec_b",":","math",":","`","B","`","at","point","base_point",":","math",":","`","S=PDP^\\top","`","using","the","Bures-Wasserstein","Riemannian","metric",":","..","math",":",":","\\frac","{","1","}","{","2","}","\\sum_","{","i",",","j","}","\\frac","{","[","P^\\top","AP","]","_","{","ij","}","[","P^\\top","BP","]","_","{","ij","}","}","{","d_i+d_j","}","Parameters","--","--","--","--","--","tangent_vec_a",":","array-like",",","shape=","[","...",",","n",",","n","]","Tangent","vector","at","base","point",".","tangent_vec_b",":","array-like",",","shape=","[","...",",","n",",","n","]","Tangent","vector","at","base","point",".","base_point",":","array-like",",","shape=","[","...",",","n",",","n","]","Base","point",".","Returns","--","--","--","-","inner_product",":","array-like",",","shape=","[","...",",","]","Inner-product","."]
code: def inner_product(self, tangent_vec_a, tangent_vec_b, base_point):
      r"""Compute the Bures-Wasserstein inner-product.
  
      Compute the inner-product of tangent_vec_a :math:`A` and tangent_vec_b
      :math:`B` at point base_point :math:`S=PDP^\top` using the
      Bures-Wasserstein Riemannian metric:
  
      .. math::
          \frac{1}{2}\sum_{i,j}\frac{[P^\top AP]_{ij}[P^\top BP]_{ij}}{d_i+d_j}
  
      Parameters
      ----------
      tangent_vec_a : array-like, shape=[..., n, n]
          Tangent vector at base point.
      tangent_vec_b : array-like, shape=[..., n, n]
          Tangent vector at base point.
      base_point : array-like, shape=[..., n, n]
          Base point.
  
      Returns
      -------
      inner_product : array-like, shape=[...,]
          Inner-product.
      """
      eigvals, eigvecs = gs.linalg.eigh(base_point)
      transconj_eigvecs = ComplexMatrices.transconjugate(eigvecs)
      rotated_tangent_vec_a = Matrices.mul(
          transconj_eigvecs, tangent_vec_a, eigvecs
      )
      rotated_tangent_vec_b = Matrices.mul(
          transconj_eigvecs, tangent_vec_b, eigvecs
      )
  
      coefficients = 1 / (eigvals[..., :, None] + eigvals[..., None, :])
      result = (
          ComplexMatrices.frobenius_product(
              gs.cast(coefficients, dtype=rotated_tangent_vec_a.dtype)
              * rotated_tangent_vec_a,
              rotated_tangent_vec_b,
          )
          / 2
      )
  
      return result
  
imports: import math
  import geomstats.backend
  from geomstats.geometry.base import ComplexVectorSpaceOpenSet
  from geomstats.geometry.complex_matrices import ComplexMatrices, ComplexMatricesMetric
  from geomstats.geometry.complex_riemannian_metric import ComplexRiemannianMetric
  from geomstats.geometry.general_linear import GeneralLinear
  from geomstats.geometry.hermitian_matrices import HermitianMatrices, expmh, powermh
  from geomstats.geometry.matrices import Matrices
  from geomstats.geometry.pullback_metric import PullbackDiffeoMetric
  from geomstats.geometry.spd_matrices import SymMatrixLog, logmh
  from geomstats.integrator import integrate
  from geomstats.vectorization import repeat_out
label_desc: Use image node_id 1 for calling the HPDBuresWassersteinMetric obj's underlying member method code with example usage: obj.inner_product(tangent_vec_a, tangent_vec_b, base_point) and returns: result