[Numpy-discussion] Tracking and inspecting numpy objects

Robert Kern robert.kern at gmail.com
Mon Sep 15 06:10:59 EDT 2014


On Mon, Sep 15, 2014 at 11:05 AM, Eelco Hoogendoorn
<hoogendoorn.eelco at gmail.com> wrote:

> Does this answer why the ndarray object itself isn't tracked though? I must
> say I find this puzzling; the only thing I can think of is that the python
> compiler notices that data isn't used anymore after its creation, and
> deletes it right after its creation as an optimization, but that conflicts
> with my own experience of the GC.

The "gc" that "gc.is_tracked()" refers to is just the cyclical garbage
detector, not the usual reference counting memory management that all
Python objects participate in. If your object cannot participate in
reference cycles (like most ndarrays), it doesn't need to be tracked.

-- 
Robert Kern



More information about the NumPy-Discussion mailing list