Hi Nitin, On 2016-12-06, David Joyner <wdjoy...@gmail.com> wrote: >> code's) length, but while finding parity check matrix of this linear >> code(using command H=C.check_mat()), I am not getting the output or >> sometimes I get the output as string index out of range...
Now that's strange. If your matrices are large than you may see something like this: sage: random_matrix(ZZ,1000,1000) 1000 x 1000 dense matrix over Integer Ring (use the '.str()' method to see the entries) So, the matrix wouldn't be directly shown but it would tell you how you can *see* the entries. Of course, seeing the entries is not the same as accessing them. This could be done (if M is your matrix) by M[10,12] for a single entry, or M[10:20,50:60] for a 10 by 10 submatrix, or by M.list() to get a flat list of all entries of the matrix, or by M[121] for a single row (as a vector). And certainly you will never get the *output* as string index out of range. You may of course get an IndexError when accessing an element out of range: sage: random_matrix(ZZ,1000,1000)[1000,1000] Traceback (most recent call last): ... IndexError: matrix index out of range >> Does it mean that >> size of matrix which is 29x35 is too large for sage to show its output. It is large enough that most people do not want to see the full output by default. That's why there is the possibility to do sage: print M.str() to show the output for those who really want to see it. And there are all the above mentioned ways to actually access the content (rather than just seeing it). Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.