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

Sebastian Haase haase at msg.ucsf.edu
Thu Sep 14 20:20:53 CDT 2006

what I'm asking is if numpy has an equivalent to numarray's info() function:
>>> na.arange(10).info()
class: <class 'numarray.numarraycore.NumArray'>
shape: (10,)
strides: (4,)
byteoffset: 0
bytestride: 4
itemsize: 4
aligned: 1
contiguous: 1
buffer: <memory at 0x085b7ec8 with size:0x00000028 held by object 0x4306e5e0 
aliasing object 0x00000000>
data pointer: 0x085b7ec8 (DEBUG ONLY)
byteorder: 'little'
byteswap: 0
type: Int32

This was always helpful to me when debugging C binding code.

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

Sebastian Haase

More information about the Numpy-discussion mailing list