On 06/07/16 15:48, Kwankyu Lee wrote:
How about "m.multiplicative_inverse()" or just "m.inverse()" which already
works for matrices? Or those with a hyphen prepended, for "internal" use.

`.inverse()` and `._invert_unit()` are different for matrices
{{{
sage: m = matrix(2, [2,1,1,1])
sage: m._invert_unit().base_ring()
Integer Ring
sage: m.inverse().base_ring()
Rational Field
}}}
My question concerns ***internal*** inversion. (internal meant inside the same parent).

On the other hand, "inverse" or "invert" implies that m is(should be) a
unit. Then "unit" in the name seems redundant...

Not in Sage, `~x` and `x.inverse()` are considered as shortcut for `1/x` and involves coercion (maybe for bad).

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.

Reply via email to