#17585: Implement coordinate_ring() for free module elements
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.5
Component: linear algebra | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17585 | f7ef4c52a51b5c3da33b795a150476d00cbeb63a
Dependencies: #10513, #17578, | Stopgaps:
#17561, #17583, #17584, #17587, |
#16399, #17602 |
-------------------------------------+-------------------------------------
Comment (by nbruin):
I noticed this in one of the commits:
{{{#!diff
- from sage.categories.all import FreeModules
- category = FreeModules(base_ring.category())
+ from sage.categories.all import Fields, FreeModules, VectorSpaces
+ if base_ring in Fields():
+ category = VectorSpaces(base_ring)
+ else:
+ category = FreeModules(base_ring)
}}}
It's important for performance and and memory-leaking that categories do
*not* refer to their base rings. This information is already stored in the
parent. Thus, the `FreeModules(base_ring.category())` is quite
intentional. Please keep it in.
Furthermore, since we were getting "Vectorspaces" before as well, I think
the category code itself will do the "base_ring in Fields()" check
already. No need to do it twice.
--
Ticket URL: <http://trac.sagemath.org/ticket/17585#comment:11>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.