[Numpy-discussion] List Array References?
Stefan van der Walt
Fri Feb 15 06:12:41 CST 2008
On Thu, Feb 14, 2008 at 03:43:46PM -0500, Alexander Michael wrote:
> Is there a way to list all of the arrays that are referencing a given
> array? Similarly, is there a way to get a list of all arrays that are
> currently in memory?
As far as I know, the reference count to the array is increased when
you create a view, but the views themselves are not tracked anywhere.
You can therefore say whether there are references around, but you
cannot identify the Python objects.
I'm curious why you need this information -- maybe there is an
alternative solution to your problem?
More information about the Numpy-discussion