On 22/05/2017 14:43, Erik Bray wrote:
On Mon, May 22, 2017 at 2:35 PM, Vincent Delecroix
<20100.delecr...@gmail.com> wrote:
Dear all,
I would like to have inplace version of transpose for matrices. For the
echelon form we have methods mat.echelonize vs mat.echelon_form. However I
do not see how to deal with transpose in the same way. I see three
reasonable possibilities
1) add an option inplace=True/False. There is at least one such method in
Sage: the relabel method for graphs. The behavior is as follows:
if inplace=True: returns a new graph
if inplace=False: modifies the graph inplace and does not return anything
I like this, and there is some precedent for it elsewhere too. But I
assume you meant this the other way around?
Indeed!
One can do the same with .transpose for matrices. However, this would be the
first time in matrix code.
2) Make a private inplace method mat._transpose_inplace()
3) Make a public inplace method mat.transpose_inplace()
Any preference between 1), 2), 3) or a suggestion for something else is
welcome!
Vincent
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.