Hi Robert! On 23 Okt., 10:18, Robert Bradshaw <rober...@math.washington.edu> wrote: > Can you run top() and see (1) how much CPU it's using and (2) how much > memory it's using (compared to your free memory).
I doubt that memory is the problem. The following is on sage.math (thus, with plenty of memory): sage: %time L = [[ZZ.random_element() for _ in range(55)] for __ in range(35354)] CPU times: user 1.28 s, sys: 0.13 s, total: 1.41 s Wall time: 1.41 s But I interrupted sage: %time M=Matrix(ZZ,L) after several minutes. BTW: Ctrl-C did not work!! I had to kill the Sage process. Other attempts to solve it: sage: MS = MatrixSpace(ZZ,35354,55) sage: %time M = MS(L) Again, I had to kill the Sage process But this works: sage: MS = MatrixSpace(ZZ,35354,55) sage: M = MS(0) sage: %time for i in range(35354*55): M[int(i/55),i %55]=ZZ.random_element() CPU times: user 14.52 s, sys: 0.01 s, total: 14.53 s Wall time: 14.53 s Or, even better: sage: %time for i in range(35354): M[i]=L[i] CPU times: user 0.31 s, sys: 0.00 s, total: 0.31 s Wall time: 0.30 s So, one should create an empty matrix and then insert the elements row by row. It surprises me that this is not done in the matrix constructor. Should be a known problem... Cheers, Simon -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org