Dear all,
I'm getting horribly confused either about what save_session does or
how to substitute variables. Or both, actually. Here is an example:
----------------------------------------------------------------------
| SAGE Version 3.1.4, Release Date: 2008-10-20 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: var('a b c')
(a, b, c)
sage: y = a*x^2 + b*x +c
sage: a = 2*b
sage: y(a=a)
2*b*x^2 + b*x + c
sage: save_session('test')
sage: load_session('test')
sage: y
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
...
AttributeError: 'dict' object has no attribute '_maxima_init_'
However, if I don't substitute a as '(a=a)' but do y.subs(a), it
works:
----------------------------------------------------------------------
| SAGE Version 3.1.4, Release Date: 2008-10-20 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: var('a b c')
(a, b, c)
sage: y = a*x^2 + b*x + c
sage: a = 2*b
sage: y.subs(a)
2*b*x^2 + b*x + c
sage: save_session('test')
sage: load_session('test')
sage: y
a*x^2 + b*x + c
Does anyone know what happened there and what is the correct way of
doing substitutions?
Thanks for your help!
Regards,
Stan
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---