ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 20 Sep 2011 17:37:30 +0200simplify_full() and symbolic vectorshttps://ask.sagemath.org/question/8338/simplify_full-and-symbolic-vectors/<b>First, the question:</b>
Suppose I've constructed some vectors with symbolic entries, call them P0 and P1. Calling simplify_full on them will -- apparently by changes introduced in the latest version (#11335 and #11381)! -- do an elementwise simplification. Great!
Suppose I construct a new symbolic vector by, say, interpolating between P0 and P1:
Pt = (1-t)*P0 + t*P1
Now
Pt.simplify_full()
produces
Traceback (click to the left of this block for traceback)
...
AttributeError:
'sage.modules.free_module_element.FreeModuleElement_generic_dense'
object has no attribute 'simplify_full'
whereas
P0.simplify_full()
and
P1.simplify_full()
work just fine. Somehow the symbolic vector-ness is forgotten in the construction of Pt.<p/>Am I doing something wrong?
<p/>
<b>Then, the disclaimer:</b>
A friend pointed me to Sage today, and this is the first thing I'm trying to do with it -- I do have background in some other symbolic tools, but this may just be a Stupid User Error despite giving this my best shot and looking at documentation.
<p/>
Anyway, I'm very impressed with what I'm seeing when I look at Sage.
<p/>
(For completeness' sake, here's a full example:
var('x,w,C0,C1,t')
P0=vector([0, C1*w/(C1*w+C0) - w/(w+C0/C1)])
P1=vector([cos(x)/sin(x)*tan(x)-1, 0])
Now both
P0.simplify_full()
P1.simplify_full()
return (0,0) as they should. But
Pt=(1-t)*P0+t*P1
Pt.simplify_full()
returns the above error.)__jacques__Tue, 20 Sep 2011 17:37:30 +0200https://ask.sagemath.org/question/8338/