tensorly.solve

solve(a, b)

Solve a linear matrix equation, or system of linear scalar equations.

Computes the “exact” solution, x, of the well-determined, i.e., full rank, linear matrix equation ax = b.

Parameters:

a : tensor, shape (M, M)

The coefficient matrix.

b : tensor, shape (M,) or (M, K)

The ordinate values.

Returns:

x : tensor, shape (M,) or (M, K)

Solution to the system a x = b. Returned shape is identical to b.