Tue Jun 4 18:28:39 2024 eigs_test(): python version: 3.10.12 numpy version: 1.26.4 Test np.linalg.eig(), a built-in function for computing eigenvalues and eigenvectors. eigs_symmetric_test(): Test eigs() on a real symmetric matrix. Real symmetric test matrix A: [[12.23467633 1.46714388 -0.1535146 0.09488267 -0.44125675] [ 1.46714388 11.8013955 -0.12698773 0.14971928 -0.32729231] [-0.1535146 -0.12698773 10.66860546 0.52138698 0.15859667] [ 0.09488267 0.14971928 0.52138698 12.90517937 0.30540313] [-0.44125675 -0.32729231 0.15859667 0.30540313 10.84390414]] Eigenvectors Q: [[-0.73875706 0.41295336 0.06383692 0.52709898 0.04241517] [-0.63684223 -0.47970804 0.02550643 -0.54123263 0.26594895] [ 0.05585081 -0.70514827 -0.22436321 0.64252994 0.19095296] [-0.11048547 0.1299202 -0.95816093 -0.12507395 -0.19286741] [ 0.1826024 0.29195272 -0.1638995 -0.02730726 0.92401907]] Eigenvalues lamda: [10.5103918 10.54140477 10.69847767 13.06920156 13.63428501] Computed eigenvectors Q2: [[ 0.73875706 0.06383692 -0.41295336 0.52709898 0.04241517] [ 0.63684223 0.02550643 0.47970804 -0.54123263 0.26594895] [-0.05585081 -0.22436321 0.70514827 0.64252994 0.19095296] [ 0.11048547 -0.95816093 -0.1299202 -0.12507395 -0.19286741] [-0.1826024 -0.1638995 -0.29195272 -0.02730726 0.92401907]] Computed eigenvalues lamda2: [10.5103918 10.54140477 10.69847767 13.06920156 13.63428501] Norm of eigenvalue error = 2.5803073537982523e-14 eigs_nonsymmetric_test(): Test eigs() on a nonsymmetric matrix. Real nonsymmetric test matrix A: [[ 4.49935688 17.0563023 0.13389198 3.82284583 -8.84364565] [-11.41321778 24.07351072 -8.84138075 1.07415807 -9.14153287] [ -7.18145024 -0.50445771 4.76174369 -0.07709551 -2.41836647] [ 2.49616628 18.64711484 -4.99737118 9.07846884 -0.67160853] [ 1.76047248 -6.55377646 2.13661705 -1.42011171 6.47529736]] Orthogonal factor Q: [[-0.48447055 0.00597837 0.37992186 -0.77282663 0.15378857] [-0.6353436 -0.66295412 -0.2773514 0.22198371 -0.17501363] [ 0.29090514 -0.38445599 -0.40406705 -0.2366254 0.74047689] [ 0.49439772 -0.45397155 -0.0325096 -0.44692699 -0.59049142] [ 0.18047685 -0.45448818 0.78384216 0.31261304 0.22075588]] Schur upper triangle T: [[13.08937618 15.44906752 10.54524957 8.52282879 12.41576187] [ 0. 6.80314156 17.43302973 6.88577145 15.47153507] [ 0. 0. 11.78774677 7.5725993 11.84913393] [ 0. 0. 0. 8.6804391 6.60736653] [ 0. 0. 0. 0. 8.52767389]] Sorted eigenvalues lamda: [ 6.80314156 8.52767389 8.6804391 11.78774677 13.08937618] Computed eigenvectors Q2: [[ 0.48447055 0.44435313 -0.30514475 -0.29702418 -0.20928656] [-0.00597837 -0.06030041 0.18483948 0.19064505 0.25540109] [-0.37992186 -0.40652693 0.45179252 0.45266171 0.45643716] [ 0.77282663 0.7816077 -0.80166314 -0.80248147 -0.79949992] [-0.15378857 -0.15079593 0.16106142 0.16294774 0.20840926]] Computed eigenvalues lamda2: [ 6.80314156 8.52767389 8.6804391 11.78774677 13.08937618] Norm of eigenvalue error = 2.225490671845925e-11 eigs_test(): Normal end of execution. Tue Jun 4 18:28:39 2024