Re: [Numpy-discussion] C-API creating new copy of C data

2007-04-21 Thread Bill Baxter
On 4/22/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Bill Baxter wrote: > > What's the right way to make a new numpy array that's a copy of some C data? > > > What do you mean by /copies/ the void * data pointer for you? Do you > mean the API would > > 1) Create new memory for the array > 2)

Re: [Numpy-discussion] C-API creating new copy of C data

2007-04-21 Thread Sebastian Haase
On 4/21/07, Travis Oliphant <[EMAIL PROTECTED]> wrote: > Bill Baxter wrote: > > What's the right way to make a new numpy array that's a copy of some C data? > > > > There doesn't seem to be any API like PyArray_NewFromDescr that > > /copies/ the void*data pointer for you. Do I have to write my own

Re: [Numpy-discussion] C-API creating new copy of C data

2007-04-21 Thread Travis Oliphant
Bill Baxter wrote: > What's the right way to make a new numpy array that's a copy of some C data? > > There doesn't seem to be any API like PyArray_NewFromDescr that > /copies/ the void*data pointer for you. Do I have to write my own > loops for this? I can do that, it just seems like it should b

Re: [Numpy-discussion] C-API creating new copy of C data

2007-04-21 Thread Sebastian Haase
On 4/19/07, Bill Baxter <[EMAIL PROTECTED]> wrote: > What's the right way to make a new numpy array that's a copy of some C data? > > There doesn't seem to be any API like PyArray_NewFromDescr that > /copies/ the void*data pointer for you. Do I have to write my own > loops for this? I can do that

[Numpy-discussion] C-API creating new copy of C data

2007-04-19 Thread Bill Baxter
What's the right way to make a new numpy array that's a copy of some C data? There doesn't seem to be any API like PyArray_NewFromDescr that /copies/ the void*data pointer for you. Do I have to write my own loops for this? I can do that, it just seems like it should be a library function already