kcrisman wrote: > The new variables don't seem to work well with the plotting code as > is; I give below output for two plots using old and new variables. I > assume this is known, but just wanted to put it out there. > > On the plus side, the new variables are MUCH faster. How do I know? > Because for the first time ever using Sage, I don't have to wait for a > variable! It is also nice to not see that "Exiting spawned Maxima > process." message. So thank you to Burcin and the rest involved in > this. > > - kcrisman > > Examples: > > Using old variables in 3.2.alpha0 works fine: > sage: var('x,y,z') > (x, y, z) > sage: plot(x^2,0,1) [works] > sage: plot(x^2,x,0,1) [works] > > Using new variables in same version, not so good: > sage: var('x,y,z', ns=1) > (x, y, z) > sage: (x+y).variables() > [x, y] # proves we have the new variables > sage: plot(x^2,0,1) > verbose 0 (3605: plot.py, _plot) WARNING: When plotting, failed to > evaluate function at 400 points. > verbose 0 (3605: plot.py, _plot) Last error message: > ''sage.symbolic.expression.Expression' object is not callable' > sage: plot(x^2,x,0,1) > verbose 0 (3400: plot.py, plot) there were 3 extra arguments (besides > x^2)
FYI, this is just because the new symbolic expressions are not callable: sage: expr=x^2 sage: expr(1) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) /home/jason/<ipython console> in <module>() TypeError: 'sage.symbolic.expression.Expression' object is not callable If you wrap it in a python function, for now, you can get the functionality you want: sage: expr=x^2 sage: def f(x): ....: return expr.subs(x=x) ....: sage: plot(f,0,1) But I'm sure it'll be taken care of soon anyway. Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---