Hi,

On Tue, Nov 25, 2008 at 6:22 AM, Stan Schymanski <[EMAIL PROTECTED]> wrote:
>
> Hi Mike,
>
> This is pretty cool, thanks! Is there something equivalent for passing
> a function f to python or numpy?

I'm not exactly sure what you mean by this so I'll take a guess.
Given, your f=a*x^2+b, do you want to be able to get an object that is
/ acts like the Python

def f(a,b,x):
    return a*x**2 + b

?

For numpy, if you had an expression like f = sin(x) + 2, you'd want
something like,

def f(x):
    return numpy.sin(x)+2

so that it'd work well with numpy arrays?

If so, then none of this is currently possible :-)  But, it's
primarily not possible since no one has seriously thought about doing
this before.  I think it would definitely make Sage's symbolic stuff
much more useful to a wider range of people.  It's also probably not
too far off with the Pynac stuff.

I'm sending this to sage-devel to get comments / feedback from people there.

--Mike

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to