[SciPy-user] More weave.blitz() questions

Joshua Menke josh at cs.byu.edu
Mon Dec 29 14:34:25 CST 2003


So my first question had me using weave.inline instead of weave.blitz, 
though I get the same error using blitz. My next question deals with 
what happens when I use functions from Numeric like exp or 
matrixmultiply. I get errors like this:

from weave import blitz
from Numeric import matrixmultiply
expr="c=matrixmultiply(a,b)"
blitz(expr)

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/weave/blitz_tools.py", line 45, 
in blitz
    if check_size and not 
size_check.check_expr(expr,local_dict,global_dict):
  File "/usr/lib/python2.2/site-packages/weave/size_check.py", line 52, 
in check_expr
    exec(expr,values)
  File "<string>", line 1, in ?
NameError: name 'matrixmultiply' is not defined

As if it can't find matrixmultiply in the size_check.check_expr 
function. This seems odd since the first line in size_check.py is "from 
Numeric import *"

Line 52 in check_expr is "exec(expr,values)

Any ideas?

thanks,

Josh

-- 
Joshua Menke
NNML Lab
BYU CS Dept.
josh at cs.byu.edu




More information about the SciPy-user mailing list