jax.numpy.linalg.tensorsolve
jax.numpy.linalg.tensorsolve#
- jax.numpy.linalg.tensorsolve(a, b, axes=None)[source]#
Solve the tensor equation
a x = b
for x.LAX-backend implementation of
numpy.linalg.tensorsolve()
.Original docstring below.
It is assumed that all indices of x are summed over in the product, together with the rightmost indices of a, as is done in, for example,
tensordot(a, x, axes=b.ndim)
.- Parameters
a (array_like) β Coefficient tensor, of shape
b.shape + Q
. Q, a tuple, equals the shape of that sub-tensor of a consisting of the appropriate number of its rightmost indices, and must be such thatprod(Q) == prod(b.shape)
(in which sense a is said to be βsquareβ).b (array_like) β Right-hand tensor, which can be of any shape.
axes (tuple of ints, optional) β Axes in a to reorder to the right, before inversion. If None (default), no reordering is done.
- Returns
x
- Return type
ndarray, shape Q