Dear Mike,

both your guesses are absolutely correct. I am surprised that no one has 
asked for it before. It is so convenient to use Sage's symbolic power to 
solve systems of equations and then use the solution in a numerical 
model. In particular, I would like to apply the solutions to arrays of 
data (e.g. time series). It could also be done by a loop, but numpy is a 
lot faster for that. The use of whole arrays for computations is what 
Matlab used to pride itself with, before Fortran got this capability.
I hope that others will find this useful, too.

Thanks for pushing this a bit further.

Cheers,
Stan

Mike Hansen wrote:
> 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