[SciPy-dev] How to speed up the computation of triple integrals

Nils Wagner nwagner at iam.uni-stuttgart.de
Tue Nov 7 03:25:25 EST 2006


David Huard wrote:
> Have you tried vectorizing ?
>
> You could define
>
> sign_r = array([1,-1,-1,1,1,-1,-1,1])
> sign_s = ...
> sign_t = ...
>
> def h(r,s,t):
>     return .125 * (1 + sign_r * r)  *  (1 + sign_s * s) * (1 + sign_t
> * t)
>
> and similarly for hp.
>
> I don't know how much speed up you'd get but I guess its worth a try.
>
> David
>
> As I understand it, this is not a topic for scipy-dev, but rather for
> scipy-user or numpy-discussion.
>
> 2006/11/6, Nils Wagner <nwagner at iam.uni-stuttgart.de
> <mailto:nwagner at iam.uni-stuttgart.de>>:
>
>     Hi all,
>
>     Is there a way to speed up the computation of triple integrals ?
>
>     Attached is a small script illustrating the task.
>
>     Any pointer would be appreciated.
>
>     Nils
>
>
>
>     _______________________________________________
>     Scipy-dev mailing list
>     Scipy-dev at scipy.org <mailto:Scipy-dev at scipy.org>
>     http://projects.scipy.org/mailman/listinfo/scipy-dev
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>   
Thank you for your hint. I will give it a try.

Nils




More information about the SciPy-Dev mailing list