#3941: threading diff over lists to give the jacobian
-------------------------+--------------------------------------------------
 Reporter:  jason        |        Owner:  jason     
     Type:  enhancement  |       Status:  assigned  
 Priority:  major        |    Milestone:  sage-3.4.1
Component:  calculus     |   Resolution:            
 Keywords:               |  
-------------------------+--------------------------------------------------
Comment (by jason):

 What about functions with codomain R^n where n>1?  If these are
 represented via a list, tuple, or vector, the code works from above (well,
 let's add handling of vectors with the following:

 {{{
 def diff(f,*args):
     if isinstance(f, (list, tuple)) or
 sage.structure.element.is_Vector(f):
         return [diff(component,*args) for component in f]
     else:
         if isinstance(args[0], (list, tuple)) or is_Vector(args[0]):
             return [diff(f,variable) for variable in args[0]]
         else:
             return sage.all.diff(f,*args)
 }}}

 This wouldn't work with a .jacobian method---where would we put the
 method?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/3941#comment:6>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to