[SciPy-dev] weave and 64-bit platforms

Fernando Perez fperez.net at gmail.com
Thu Jun 22 18:13:26 EDT 2006


On 6/22/06, Robert Kern <robert.kern at gmail.com> wrote:

> That segment of code is in standard_array_spec.py . I think those int*s should
> be intp*s. I think I made that modification in my checkout copy, but I never
> tested it on 32-bit so I didn't check it in.
>
> If you can provide an example for me to try without thinking, I'll test it on my
> machine with that change and you test it on your 32-bit machine.

Mmh, is the script I included in the previous mail not enough?  It
passes on 32-bits but fails on 64.  Here it is again (let me know if
you want something different):

#!/usr/bin/env python
import numpy as N
from scipy.weave import inline

vec = N.rand(100)

code = """
double sum = 0.0;
int npts = Nvec[0];
for (int i=0;i<npts;++i) {
   sum += vec[i];
}
return_val = sum;
"""

print inline(code,['vec'])
print vec.sum()

# EOF

Thanks,

f




More information about the SciPy-Dev mailing list