[Numpy-discussion] Numarrays from C arrays without copying

Craig Rasmussen crasmussen at lanl.gov
Thu Apr 22 11:33:01 CDT 2004


On Apr 22, 2004, at 10:46 AM, Sebastian Haase wrote:

>    obj = PyBuffer_FromReadWriteMemory(theRing.bufferPtr(),
> theRing.bufferSize());
>    obj2 =(PyObject*) NA_NewAllFromBuffer( 4, shape, tUInt16, obj, 0, 0,
> NA_ByteOrder(), 1, 1/*writable*/) ;

It looks like this will work.

I thought Todd had been saying that this wasn't possible.  Perhaps I
did not phrase my question very well when I asked earlier.

Thanks,
Craig





More information about the Numpy-discussion mailing list