torch.linalg.eig
torch.linalg.eig(A, *, out=None)
Computes the eigenvalue decomposition of a square matrix if it
   exists.
Letting \mathbb{K} be \mathbb{R} or \mathbb{C}, the eigenvalue
   decomposition of a square matrix A \in \mathbb{K}^{n \times n}
   (if it exists) is defined as
  A = V \operatorname{diag}(\Lambda) V^{-1}\mathrlap{\qquad V \in
  \mathbb{C}^{n \times n}, \Lambda \in \mathbb{C}^n}

This decomposition exists if and only if A is diagonalizable. This
   is the case when all its eigenvalues are different.
Supports input of float, double, cfloat and cdouble dtypes. Also
   supports batches of matrices, and if "A" is a batch of matrices
   then the output has the same batch dimensions.
Note:
 The eigenvalues and eigenvectors of a real matrix may be complex.

Note:
 When inputs are on a CUDA device, this function synchronizes that
 device with the CPU.

Warning: