#10876: Create elementary matrices
-----------------------------------+----------------------------------------
Reporter: rbeezer | Owner: jason, was
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-4.7
Component: linear algebra | Keywords:
Author: Rob Beezer | Upstream: N/A
Reviewer: Karl-Dieter Crisman | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
Changes (by kcrisman):
* status: needs_review => needs_work
* reviewer: => Karl-Dieter Crisman
Comment:
This looks really nice, Rob - comprehensive, useful, well-organized and
tested. I like your using the Python 3 string formatting, which I have
yet to learn - didn't realize it was already supported.
Just a few questions, and then a 'needs work':
* Think we need to remind people that the rows are numbered from 0 to
n-1? Up to your discretion; if one actually reads and understands the
doc, it's clear, but just asking since we sometimes like to remind of
things like this that are not standard math notation.
* Super-picky - `FORMAT` is hardly ever used in Sage, rather `INPUT` is
used, even for `matrix?`. Any particular reasoning behind this one? I'm
asking just in terms of consistency.
I fear that the notion that the ring is optional will lead to incorrect
use of that without keywords. Can you think of any other way to word the
first few things?
Here is an example of what it can lead to.
{{{
sage: elementary_matrix(4,3,3,3)
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
}}}
And this:
{{{
sage: elementary_matrix(4,3,scale=4)
[4 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
sage: elementary_matrix(4,scale=4)
[4 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
}}}
I don't think that either of these are 'allowed', but the second of these
in particular is very tempting, with n=4, row 3, scale by 4.
Because of the audience of this patch, I think it is really important to
make sure we catch things like this, esp. plausible use cases. It would
be nice to not need the ring at all, but I understand that for consistency
with other matrix invocations this needs to be the first (optional)
argument.
Anyway, none of this takes away from this being a nice addition for LA
teaching with Sage.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10876#comment:2>
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.