#9089: Graphics3dGroup __add__ modifies its arguments
---------------------------+------------------------------------------------
Reporter: jason | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone:
Component: algebra | Keywords:
Author: Jason Grout | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
In an attempt to optimize, in some cases the __add__ method of
Graphics3dGroup modifies its arguments instead of returning a new
Graphics3dGroup object. This breaks the user expectation, as illustrated
below:
{{{
a=point3d([1,0,0])+point3d([0,1,0])
b=point3d([0,0,1])
a # shows 2 points
a+b # shows all 3 points
a # Now this shows 3 points!!!
}}}
The attached patch deletes the offending optimization. If fast summing is
needed, then the user can either create a Graphics3dGroup object
themselves, or use something like {{{sage.misc.misc.balanced_sum}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9089>
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.