cupy.linalg.tensorinv¶
-
cupy.linalg.
tensorinv
(a, ind=2)[source]¶ Computes the inverse of a tensor.
This function computes tensor
a_inv
from tensora
such thattensordot(a_inv, a, ind) == I
, whereI
denotes the identity tensor.Parameters: - a (cupy.ndarray) – The tensor such that
prod(a.shape[:ind]) == prod(a.shape[ind:])
. - ind (int) – The positive number used in
axes
option oftensordot
.
Returns: The inverse of a tensor whose shape is equivalent to
a.shape[ind:] + a.shape[:ind]
.Return type: See also
- a (cupy.ndarray) – The tensor such that