#13949: Make mutability on matrices a simple bint flag
---------------------------------+------------------------------------------
Reporter: nbruin | Owner: tbd
Type: PLEASE CHANGE | Status: new
Priority: major | Milestone: sage-5.6
Component: PLEASE CHANGE | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------------+------------------------------------------
Comment (by nbruin):
First attempt: straightforward exercise. Things of note:
- I changed the name of the attribute to Matrix._immutability, because a
`False` value on a `Mutability` object already means `mutable` (horrible
user interface for that routine! At least the internal attributes are at
least named appropriately. Added benefit: The compiler immediately
complains about unchanged locations (because the old attribute simply
doesn't exist anymore). Possible better name: `_is_immutable`.
- It almost seemed pickling would be a problem. However, in `matrix0`, it
turns out that pickling isn't implemented anyway, so there are no old
pickles to be concerned about.
- note that `Matrix` instances also have a `_cache` attribute; a
dictionary. This is also expensive to initialize. Would it be a good idea
to also allow `None` as a sentinel value there and that any routine that
needs `_cache` replaces `None` there by an empty dictionary? Or is that an
unacceptable cost for cache use?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13949#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.