ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> scipy-dev
scipy-dev
Re: [SciPy-dev] How to speed up the computation of triple integrals
by David Huard other posts by this author
Nov 6 2006 8:28AM messages near this date
[SciPy-dev] How to speed up the computation of triple integrals | Re: [SciPy-dev] How to speed up the computation of triple integrals
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@[...].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@[...].org
>  http://projects.scipy.org/mailman/listinfo/scipy-dev
> 
> 
> 
> 
Thread:
Nils Wagner
David Huard
Nils Wagner

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved