[SciPy-user] weave and numpy

Sebastian Haase haase at msg.ucsf.edu
Mon Aug 7 19:54:52 CDT 2006


On Monday 07 August 2006 17:50, Sebastian Haase wrote:
> Hi,
> if I pass a numpy array 'arr' as argument
> a) how does the C code get arr.ndim ?
> b) how does the C code get arr.shape[0],... ?
> c) if the C code changes elements of arr, are those changes *on the
> original data* ? In other words, is weave.inline making a copy of arr ?
>
> I searched through
> http://projects.scipy.org/scipy/scipy/browser/trunk/Lib/weave/doc/tutorial.
>html?format=raw but did not find a definite answer. From
> the 'array3d.py' example in weave in looks like Narr would contain the
> shape !?
>
Oh, and I forgot: How about non-contiguous arrays !?
In the case that these are handled - does that slow things down for proper 
aligned arrays,  too !?

> Thanks,
> Sebastian Haase


More information about the SciPy-user mailing list