[SciPy-User] Uniquely identify array

Chris Weisiger cweisiger at msg.ucsf.edu
Tue Jul 19 12:04:34 EDT 2011


Is there some way in Python to uniquely identify a given Numpy array?
E.g. to get a pointer to its location in memory or something similar?
I'm looking for some way to determine which operations will implicitly
create new arrays, just to verify that I'm not doing anything that
will seriously hurt my performance -- but this seems like something
that would be generally useful to know.

Unfortunately ndarrays don't allow arbitrary additions to their
namespace; no doing "foo.myUniqueIdentifier = 1", for example.

Thanks in advance!

-Chris



More information about the SciPy-User mailing list