[Numpy-discussion] Numarrays from C arrays without copying
jmiller at stsci.edu
Thu Apr 22 06:11:02 CDT 2004
On Thu, 2004-04-22 at 08:51, Ville Hakulinen wrote:
> Dear all,
> I would like to turn a large C array allocated by a library into a
> Numarray object without copying the contents. In other words I have
> a given array of double precision floats and I want to get a Numarray
> object, where the data pointer points to this array and no additional
> memory is allocated. Naturally when the reference count of the Numarray
> object gets back to zero, the object is freed, but the array itself
> is left as a nuisance for the C code.
> Is there a standard way of doing this?
No, not yet. You're not the first person to ask for this but I'd
appreciate it if you'd explain why you need it. So far, not having
that feature is a conscious omission to keep complexity down.
Todd Miller <jmiller at stsci.edu>
More information about the Numpy-discussion