On Thu, Mar 26, 2009 at 07:17:14PM -0700, Ondrej Certik wrote:
> But even when this is fixed --- it will still be a sympy integral. So
> what do you want lambdify to do with it? keep it as a sympy integral
> and you will then call .evalf() yourself on it, or make it somehow
> call scipy.integrate? I believe the best option is to patch sympy to
> create an option in .evalf(use_scipy=True), that would lambdify the
> argument and then call scipy integrate on the argument.

> But try sympy's integration, if it's <1000, it *may* be fast enough.
> If it's not, let's implement use_scipy, so that it can use scipy
> automatically.

That will be good-enough for now.

> Btw, I am myself surprised, that we can do this integral already:

> In [16]: i
> Out[16]:
> ∞
> ⌠
> ⎮     2
> ⎮   -x
> ⎮  ℯ    dx
> ⌡
> -∞

> In [17]: i.doit()
> Out[17]:
>   ⎽⎽⎽
> ╲╱ π

> In [18]: i.evalf()
> Out[18]: 1.77245385090552

> In [19]: i.doit().evalf()
> Out[19]: 1.77245385090552

OK, I guess this relates to my other problem (the subs not working).

> > I would like 'Out[4]' to have x substituted :). I can see why it is hard
> > (sympy is probably not tracking that the integration variable does not
> > depend on x), but I'd still like it :).

> Yes, sure. I think it doesn't work yet, I found some related issues:

> http://code.google.com/p/sympy/issues/detail?id=951
> http://code.google.com/p/sympy/issues/detail?id=987

> anyway, I made a new one set to fix in the next release, as this is a
> high priority and I think it's easy to fix:

> http://code.google.com/p/sympy/issues/detail?id=1351

Cool, great.

> Let's make a deal --- I'll fix this for you and you'll review my
> patches that are holding off the sympy release:

> http://code.google.com/p/sympy/issues/list?q=label:NeedsReview

> :)

> Then we can release sympy *and* have it fixed.

Sounds like a deal. I'll start right away (I wil have to run soon, but
I'l try to do it tongiht, coming back from the restaurant -- I am in
Berkeley, with some people you know). Anyway, your code reads like a
book, so it will be a piece of cake :).

Gaël

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to