Computes the eigenvalues and eigenvectors of a real square matrix.
tch_eig(x, eigenvectors = FALSE)
x | tensor object |
---|---|
eigenvectors | True to compute both eigenvalues and eigenvectors; otherwise, only eigenvalues will be computed. |
#> [[1]] #> tensor #> 1.9042 0.0000 #> -0.0420 0.6419 #> -0.0420 -0.6419 #> -0.1454 0.1315 #> -0.1454 -0.1315 #> [ Variable[CPUFloatType]{5,2} ] #> #> [[2]] #> tensor #> [ Variable[CPUFloatType]{0} ] #>