[SciPy-User] Problem with passing a 2D Numpy array in the C code by weave.inline

Steven Nien steven.nien at gmail.com
Thu Dec 3 08:32:14 EST 2009


Hi,
Thanks.
I use the following code, and it works.

inline(code,['arr'], verbose = 1, compiler = 'gcc',  type_converters =
converters.blitz)

But it  works in the arr(i,j) syntax.

Is there any way to use the original C syntax ( arr[i][j] ) ?

Regards,
Steven Nien


2009/12/3 Jose Gomez-Dans <jgomezdans at gmail.com>

> Hi,
>
> 2009/12/3 Steven Nien <steven.nien at gmail.com>
>
>> Hello,
>>
>> Thanks, but it didn't work (with error message).
>>
>
> Are you sure you are not hitting this bug?
> <http://projects.scipy.org/scipy/ticket/739>
>
> I have applied the patch and your code works here:
>
> *$ python test_weave.py
> <weave: compiling>
> Compiling code...
> finished compiling (sec):  1.45934510231
> [[ 1.  0.  0.]
>  [ 0.  0.  0.]]
> *
> Jose
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20091203/53d8a36d/attachment.html>


More information about the SciPy-User mailing list