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

David Huard david.huard at gmail.com
Mon Nov 6 10:28:20 CST 2006


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>:
>
> 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
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-dev/attachments/20061106/12212bd6/attachment.html 


More information about the Scipy-dev mailing list