On 4 March 2015 at 15:03, slelievre <[email protected]> wrote: > > John Cremona: >> >> What is the simplest way to do this. I have a matrix M (square and >> over ZZ, but that is not so important). I want to make another matric >> of the same size & base. I have not explicitly constructed the >> associated matrix space, but I know that I can get it wth M.parent(), >> so doing newM = M.parent()(0) would work, but is there something >> more natural? > > > If m is a matrix and p is a list of column indices, do > > m.matrix_from_columns(p)
Thank you, that is exactly what I need, or rather m.matrix_from_rows_and_columns(perm,perm) will give a new matrix with both row & column permutations applied, using a simple list for perm. Perfect! John > > > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
