#10568: multipying sparse matrices by integers in unnecceraly slow
-------------------------------+--------------------------------------------
Reporter: mderickx | Owner: jason, was
Type: enhancement | Status: needs_review
Priority: major | Milestone:
Component: linear algebra | Keywords:
Author: Maarten Derickx | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------------+--------------------------------------------
Changes (by mderickx):
* status: needs_info => needs_review
Comment:
Yeah, I thought the HUGE doctest was nice to :). It at least shows what is
different about this function compared to the function it overwrites. And
it makes sure that if someone accidentally replaces this function by
something not sparse that the doctest would never complete :).
I don't think the doctest you suggest is a good addition in this
particular place, from the reference manual
http://www.sagemath.org/doc/reference/coercion.html:
{{{
If R is the base of S (as in the first example), simply implement
_rmul_ and/or _lmul_ on the Elements of S. In this case r * s gets
handled as s._rmul_(r) and s * r as s._lmul_(r). The argument to
_rmul_ and _lmul_ are guaranteed to be Elements of the base of S (with
coercion happening beforehand if necessary).
}}}
So the new code has noting to do with coercion. I really think that tests
should be performed in the place where the relevant code is. Since there
is no coercion happening in this low level _lmul_ function this should not
be tested here.
Input and output block are added and now with .patch extension :
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10568#comment:7>
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.