Help needed with Weave and XP and MSVC 6.0

zhuang at princeton.edu zhuang at princeton.edu
Sun Jan 22 01:58:23 EST 2006


Hi,

   I'm having some problems getting weave to work correctly. For now,
I'm just testing how to
access Numeric arrays under weave. My test code is:

from Numeric import *
import weave

a = zeros((5,5,5,5,5),typecode=Int16)
a[4,3,2,2,1] = 55.0

code = """

a[0,0,3,0,0] = 3.0;
printf("%d",a[4,3,2,2,1]);

"""

weave.inline(code,['a'] ,type_converters= weave.converters.blitz,
compiler='msvc')


The interperter is currently spitting out errors which ends in:
 "AttributeError: array_info instance has no attribute 'msvc_msg'"

If I leave off the compiler keyword, the interperter then starts having
problems with
the type_converter. If l leave both keywords off, the code just doesn't
work.

On the other hand, I have had success saving Numeric arrays to file
using fwrite and opening them again with fread. I have a feeling that
my weave/python
install is messed up, but I'm not sure what's wrong. I first installed
MSVC 6, then the
Enthought package of python/weave. Has anybody ever experienced this
problem?




More information about the Python-list mailing list