[SciPy-dev] Accelerated modules

Pat Miller pnmiller at pacbell.net
Mon Feb 11 22:28:07 CST 2002


I think the model we want to shoot for with weave accelerated
modules and functions is something like in

# This is foobar.py

def f(x):
    < some thing >

def g(x,y):
    < some other thing >

class foo:
    def __init__(self):
         ...
    def solver(self,x):
         ....

try:
     # Pull in accelerated ones if they exist
     from foobar.accelerated import *
except:
     import weave
     f = weave.accelerate(f)
     g = weave.accelerate(g)
     foo.solver = weave.accelerate(foo.solver)




More information about the Scipy-dev mailing list