Hi Alex,

On Sun, 7 Jun 2009 11:31:26 -0700 (PDT)
Alex Raichev <[email protected]> wrote:

> 
> Hi all:
> 
> Upon upgrading to Sage 4.0, i can no longer make a dictionary with
> derivatives as keys (see below).  Can someone please fix this?

> ----------------------------------------------------------------------
> | Sage Version 4.0, Release Date: 2009-05-29                         |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: X= var('x,y')
> sage: f= function('f',*X); f
> f(x, y)
> sage: for x in X:
> ....:     diff(f,x)
> ....:
> D[0](f)(x, y)
> D[1](f)(x, y)
> sage: d= {}
> sage: for x in X:
> ....:     d[diff(f,x)] = 1
> ....:

<snip>
> /Applications/sage/local/lib/python2.5/site-packages/sage/rings/
> complex_interval_field.pyc in __call__(self, x, im)
>     286
>     287             try:
> --> 288                 return x._complex_mpfi_( self )
>     289             except AttributeError:
>     290                 pass
> 
> /Applications/sage/local/lib/python2.5/site-packages/sage/symbolic/
> expression.so in sage.symbolic.expression.Expression._complex_mpfi_
> (sage/symbolic/expression.cpp:5484)()
<snip>
> /Applications/sage/local/lib/python2.5/site-packages/sage/symbolic/
> expression_conversions.pyc in derivative(self, ex, operator)
>     344             NotImplementedError: derivative
>     345         """
> --> 346         raise NotImplementedError, "derivative"
>     347
>     348     def arithmetic(self, ex, operator):
> 
> NotImplementedError: derivative
> 

I opened a ticket for this:

http://trac.sagemath.org/sage_trac/ticket/6243

As I wrote on the ticket, I believe the correct fix is to change pynac
to handle more general numerical approximations. I will try to get this
done until the next release.

There might be an easier fix by implementing the derivative method in
sage.symbolic.expression_conversions.Converter. Maybe Mike can comment
on that.


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
-~----------~----~----~----~------~----~------~--~---

Reply via email to