[Numpy-discussion] question about memory ownership
Sat Jan 17 22:23:38 CST 2009
On Sat, Jan 17, 2009 at 22:06, Darren Dale <email@example.com> wrote:
> Would someone be so kind as to explain how to create an ndarray subclass
> that owns its own memory? I think RealisticInfoArray at
> does not own its own memory, do you have to call ndarray.__new__ directly,
> or is there another way?
Does it matter? Unless if something actually digs down to grab the
base object, the RealisticInfoArray object is the only thing keeping
it alive. When it goes away, the underlying array goes away.
But take a look at the implementation of memmap for a subclass that
calls ndarray.__new__ directly.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion