aesara.tensor.nlinalg.tensorsolve#
- aesara.tensor.nlinalg.tensorsolve(a, b, axes=None)[source]#
Aesara utilization of numpy.linalg.tensorsolve.
Solve the tensor equation
a x = bfor x. It is assumed that all indices ofxare summed over in the product, together with the rightmost indices ofa, as is done in, for example,tensordot(a, x, axes=len(b.shape)).- Parameters:
a (array_like) – Coefficient tensor, of shape
b.shape + Q.Q, a tuple, equals the shape of that sub-tensor ofaconsisting of the appropriate number of its rightmost indices, and must be such thatprod(Q) == prod(b.shape)(in which senseais said to be ‘square’).b (array_like) – Right-hand tensor, which can be of any shape.
axes (tuple of ints, optional) – Axes in
ato reorder to the right, before inversion. If None (default), no reordering is done.
- Returns:
x
- Return type:
ndarray, shape Q
- Raises:
LinAlgError – If
ais singular or not ‘square’ (in the above sense).