[Numpy-discussion] how to get info about internals of an array object ?

Francesc Altet faltet at carabos.com
Fri Sep 15 01:10:29 CDT 2006


El dj 14 de 09 del 2006 a les 18:20 -0700, en/na Sebastian Haase va
escriure:

> Especially I'm asking if there is any way to get the memory address of an 
> array - for debugging purposes only - of course ;-)

For this, you can print the data buffer:

In [1]:import numpy
In [2]:a=numpy.array([1])
In [3]:a.data
Out[3]:<read-write buffer for 0x82a9970, ptr 0x821f630, size 4 at
0xb6dd3300>

although I'm not sure which number is the memory address I'd say it's
the last one.

Cheers,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"






More information about the Numpy-discussion mailing list