Thanks for the fast responses!

> data. Storing bare pointers in the C side and not holding a
> reference to the object providing the data in the C side is really 
> error prone.

It's true, I don't do it because I have to process a large number of arrays, 
and each has thousands of elements; so I tried to avoid making copies because 
it'd make it slow. 

 
> another option is that you could increase the reference count to 
> that array in your C code (Py_INCREF). Then it would not be 
> destroyed on the Python side. However, you'd have to make sure you
> Py_DECREF it when you don't need it anymore.

Thanks for the suggestion, I didn't know that was possible; I'm new to python.

-Jose  





_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to