On Tue, Feb 17, 2009 at 7:16 PM, Jason Grout <jason-s...@creativetrax.com> wrote: > > I was tinkering around trying to get the following to work: > > f(x,y,z) = vector([x^2,y+z,x*y*z]) > > which defines a 3d vector field, or in general, some function from SR^n > to SR^m. However, it seems like extensive changes may be silly to make > now, given how much pynac is improving (and how soon it is likely to get > into Sage). Does pynac support doing something like the above? > > Wishful syntax for this functionality includes: > > f(vector([x,y,z])) = vector([x^2,y+z,x*y*z]) > > f(1,2,3) # evaluate at x=1, y=2, z=3 > > f(x=1,z=3,y=2) # evaluate at x=1, y=2, z=3 > > f(vector([1,2,3])) # evaluate at x=1, y=2, z=3, so you can compose > f(f(1,2,3)) > > diff(f) # jacobian of f > > fast_float(f, 'x,y,z') # returns a callable that takes 3 arguments and > returns an RDF vector (this syntax may not be right; it should be > whatever the current fast_float syntax is) > > > f.args() # gives (x,y,z), in that order > > f.variables() # gives (x,y,z), in some order > > On the other hand, getting this functionality for the current symbolic > functions would be great too. If it looks like pynac will be a long > time in coming, I'll probably add this to my list of things to do. > >
My first thought is that doing the above might be somewhat orthogonal to pynac, since pynac provides the low-level symbolic manipulation, and the above would just be a natural thing built on top of that. Burcin may have different remarks though. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---