You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i tried to run the code below, it seemed to loop endlessly without a result even after 14 hours of computation. What I tried was to compute the eigenvectors of a 4x4 matrix. I have the same problem wether I run it on a jupyter notebook or in ipython.
I ran the
importnumpyasnpimportsympyasspa=np.array([11,12,21,22])
UA=np.array(sp.symbols('UA_{0} UA_{1} UA_{2} UA_{3}'.format(*a))).reshape(2,2)
UB=np.array(sp.symbols('UB_{0} UB_{1} UB_{2} UB_{3}'.format(*a))).reshape(2,2)
UAB=np.array(sp.symbols('UAB_{0} UAB_{1} UAB_{2} UAB_{3}'.format(*a))).reshape(2,2)
P=sp.Matrix(np.zeros([4,4]))
P[0:2,0:2] =UAP[2:4,2:4] =UBP[2:4,0:2] =UABP[0:2,2:4] =UAB.Tsp.Matrix(P).eigenvects()
#display(sp.Matrix(P).eigenvects()) # I ran it from within a jupyter notebook
´´´
The text was updated successfully, but these errors were encountered:
Computing the eigenvalues takes less than 2 minutes on my system but the expressions are very complicated. The expression of a single eigenvalue has length 59310, much more than what the screen buffer can hold. This is a small piece of one eigenvalue:
It seems that the memory of my system is not big enough for computing the eigenvectors, and the system slows down dramatically when it starts swapping memory to disk. The computation might succeed on a fast system with very large memory, but I suspect that the result would be too complicated to be really useful.
Aha! Thanks for the information! I have not expected such an increase in complexity as the eigenvector calculations took only moments for a 3x3 matrix. I have outsourced the code to our computational cluster where the code can have all the time it wants. If you are interested, I can tell you the computing time results once it's done.
When i tried to run the code below, it seemed to loop endlessly without a result even after 14 hours of computation. What I tried was to compute the eigenvectors of a 4x4 matrix. I have the same problem wether I run it on a jupyter notebook or in ipython.
I ran the
The text was updated successfully, but these errors were encountered: