#11328: matrix insert row won't take ints
----------------------------------+-----------------------------------------
Reporter: kcrisman | Owner: jason, was
Type: defect | Status: new
Priority: minor | Milestone: sage-5.0
Component: linear algebra | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by ppurka):
It is strange that only the integer matrices support the `insert_row()`
command, as the following grep shows:
{{{
...rc0.11080/devel/sage-mainĀ» grep ' insert_row(' sage/matrix/**/*.py*
sage/matrix/matrix_integer_dense.pyx: def insert_row(self, Py_ssize_t
index, row):
}}}
I would have expected this to be a method available to all dense matrices
at least. Is it because of the requirement of typing in cython that this
is not implemented for other dense matrices?
Another thing that puzzles me is that the method does not change the
original matrix at all! With an integer matrix `m` being called as
`m.insert_row(...)`, I would expect that `m` itself will get modified
after the operation. This will be consistent with some other python
functions such as lists:
{{{
sage: l = range(2)
sage: l.insert(0,3)
sage: l
[3, 0, 1]
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11328#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.