cupy.linalg.tensorsolve#

cupy.linalg.tensorsolve(a, b, axes=None)[source]#

Solves tensor equations denoted by ax = b.

Suppose that b is equivalent to cupy.tensordot(a, x). This function computes tensor x from a and b.

Parameters
  • a (cupy.ndarray) – The tensor with len(shape) >= 1

  • b (cupy.ndarray) – The tensor with len(shape) >= 1

  • axes (tuple of ints) – Axes in a to reorder to the right before inversion.

Returns

The tensor with shape Q such that b.shape + Q == a.shape.

Return type

cupy.ndarray

Warning

This function calls one or more cuSOLVER routine(s) which may yield invalid results if input conditions are not met. To detect these invalid results, you can set the linalg configuration to a value that is not ignore in cupyx.errstate() or cupyx.seterr().