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

Travis Oliphant oliphant.travis at ieee.org
Fri Sep 15 12:44:23 EDT 2006


Albert Strasheim wrote:
>> -----Original Message-----
>> From: numpy-discussion-bounces at lists.sourceforge.net [mailto:numpy-
>> discussion-bounces at lists.sourceforge.net] On Behalf Of Sebastian Haase
>> Sent: 15 September 2006 03:21
>> To: numpy-discussion
>> Subject: [Numpy-discussion] how to get info about internals of an
>> arrayobject ?
>>
>> Hi,
>> what I'm asking is if numpy has an equivalent to numarray's info()
>> function:
>>     
>
>   
>> <snip>
>>     
>
>   
>> 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 ;-)
>>     
>
> numpy.array([]).__array_interface__['data'][0]
>   

Or

numpy.ctypes._as_parameter_

(should work even if you don't have ctypes installed)

-Travis





More information about the NumPy-Discussion mailing list