#19870: Cythonize matrix group elements
-------------------------------------+-------------------------------------
Reporter: tscrim | Owner: tscrim
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.0
Component: cython | Resolution:
Keywords: matrix group, | Merged in:
elements | Reviewers:
Authors: Travis Scrimshaw | Work issues:
Report Upstream: N/A | Commit:
Branch: | 29f72539754e8efba97deb07a93d735af559a552
public/groups/cythonize_matrix_group_element-19870| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Why not
{{{
try:
M = M._invert_unit()
except AttributeError:
M = ~M
if M.base_ring() is not parent.base_ring():
M = M.change_ring(parent.base_ring())
}}}
That would let the possibility for other rings/sparse matrices to
implement an `_invert_unit` if appropriate. Though, if somebody changes
the name of `_invert_unit` it will not be discovered. An alternative would
be to implement a naive `_invert_unit` directly as a matrix method
(basically following what you did).
--
Ticket URL: <http://trac.sagemath.org/ticket/19870#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.