Re: [Numpy-discussion] Pointers to arrays in C

2008-06-03 Thread Jose Martin
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

Re: [Numpy-discussion] Pointers to arrays in C

2008-06-03 Thread Christopher Barker
Lisandro Dalcin wrote: > I believe in your current setup there is no better way. But you should > seriously consider changing the way of using array 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. exact

Re: [Numpy-discussion] Pointers to arrays in C

2008-06-03 Thread Lisandro Dalcin
I believe in your current setup there is no better way. But you should seriously consider changing the way of using array 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. On 6/3/08, Jose Martin <[EMAIL PROT

[Numpy-discussion] Pointers to arrays in C

2008-06-03 Thread Jose Martin
Hi, I read a file with array data (one per line), and send the arrays to a module in C. In the C module, I need to store pointers to the arrays, so I don't have to make a copy for each array it receives from python. I found that if I reuse the same variable name to create the array, the pointe