pyriemann.geometry.tangentspace.innerproduct_euclid

pyriemann.geometry.tangentspace.innerproduct_euclid(X, Y, *args)[source]

Euclidean inner product.

Euclidean inner product \(\mathbf{g}\) between matrices \(\mathbf{X}\) and \(\mathbf{Y}\) is:

\[\mathbf{g}(\mathbf{X}, \mathbf{Y}) = \text{tr}(\mathbf{X}^H \mathbf{Y})\]
Parameters:
Xndarray, shape (…, n, m)

First matrices.

Yndarray, shape (…, n, m) | None

Second matrices. If None, Y is set to X, giving the squared norm of X.

Returns:
Gfloat or ndarray, shape (…,)

Euclidean inner product between X and Y.

See also

innerproduct

Notes

Added in version 0.11.

Changed in version 0.12: Add support for NumPy and PyTorch.