[Numpy-discussion] Cython: Passing numpy array into C via buffer?

2008-09-26 Thread Richard Shaw
Hello, Forgive me if this is a stupid question, I've been looking around all the Cython documentation and I can't find out if this is possible. What I would like to do is generally is wrap a C function that takes a double array, and be able to pass in a numpy array, I was wondering if it's

Re: [Numpy-discussion] Cython: Passing numpy array into C via buffer?

2008-09-26 Thread Dag Sverre Seljebotn
Richard Shaw wrote: Hello, Forgive me if this is a stupid question, I've been looking around all the Cython documentation and I can't find out if this is possible. What I would like to do is generally is wrap a C function that takes a double array, and be able to pass in a numpy array,

Re: [Numpy-discussion] Cython: Passing numpy array into C via buffer?

2008-09-26 Thread Dag Sverre Seljebotn
Richard Shaw wrote: Hello, Forgive me if this is a stupid question, I've been looking around all the Cython documentation and I can't find out if this is possible. What I would like to do is generally is wrap a C function that takes a double array, and be able to pass in a numpy array,

Re: [Numpy-discussion] Cython: Passing numpy array into C via buffer?

2008-09-26 Thread Richard Shaw
Dag Sverre Seljebotn wrote: I'm sorry, my previous answer was a really, really bad one. Here's a better one: data = double*numarr.data :-) With the addition of the _t on float64 this should just work. That sounds great. I thought there must be something like that, it's glad to see that