Hi Alex,
On Mon, 16 Mar 2009 19:26:26 -0700 (PDT)
Alex Raichev <[email protected]> wrote:
>
> ----------------------------------------------------------------------
> | Sage Version 3.4, Release Date: 2009-03-11 |
> | Type notebook() for the GUI, and license() for information. |
> ----------------------------------------------------------------------
> sage: var('x,y', ns=1)
> (x, y)
> sage: f= x+y
> sage: type(f)
> <type 'sage.symbolic.expression.Expression'>
> sage: jacobian(f,[x,y])
> ---------------------------------------------------------------------------
> TypeError Traceback (most recent call
> last)
>
> /Users/arai021/<ipython console> in <module>()
>
> /Applications/sage/local/lib/python2.5/site-packages/sage/calculus/
> functions.pyc in jacobian(functions, variables)
> 136
> 137 if not isinstance(variables, (tuple, list)) and not
> is_Vector(variables):
> 138 variables = [variables]
> 139
> --> 140 return matrix([[diff(f, v) for v in variables] for f in
> functions])
>
> /Applications/sage/local/lib/python2.5/site-packages/sage/calculus/
> functional.pyc in derivative(f, *args, **kwds)
> 145 pass
> 146 if not isinstance(f, SymbolicExpression):
> --> 147 f = SR(f)
> 148 return f.derivative(*args, **kwds)
> 149
<snip>
> TypeError: cannot coerce type '<type
> 'sage.symbolic.expression.Expression'>' into a SymbolicExpression.
You get this error because pynac expressions don't define
a .derivative() function. I also noticed that the interface for .diff()
doesn't match the rest of Sage.
I'll fix this and post a patch when I find the time. That will be this
evening, or sometime tomorrow.
Thanks.
Burcin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---