[SciPy-User] Problem with passing a 2D Numpy array in the C code by weave.inline
Thu Dec 3 02:22:03 CST 2009
I'm trying to pass a 2 dimensional numpy array into the 'weave.inline' and
doing some computation in C.
But it seems that the 'weave.inline' will convert a 2d array in python into
a 1d array in C.
So if I have a MxN array 'arr'
I need to access arr in C by the following code:
arr[2*N+3] = 0;
What I want is accessing the array by the original syntax in C , i.e.,
'arr = 0;'
Since I have lot's of legacy 2D-array code write in C, I don't wan't use
the Blitz method.
And I still want to use the 'weave.inline' function.
Does anyone have any idea?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User