skfolio.utils.stats.multiply_by_inverse#

skfolio.utils.stats.multiply_by_inverse(a, b)[source]#

Multiply matrix a by the inverse of matrix b. We use np.linalg.solve as it tends to produce more accurate results than np.linalg.inv.

Parameters:
andarray of shape (n, m)

Matrix.

bndarray of shape (n, n)

Square matrix.

Returns:
mndarray of shape (n, m)

The matrix a multiplied by the inverse of matrix b.