[Numpy-discussion] Dcoument strings for ndarray

Travis Oliphant oliphant at ee.byu.edu
Sun Oct 9 17:07:21 CDT 2005

>> I'm not sure what you are talking about here?  Where are you getting 
>> this?
>> I don't know of any such attribute.  There is a __class__ attribute.  
>> But I don't see a
>> __class__ module(name[, doc])   attribute
>> -Travis
> Please see the sequence below:
>     >>> import scipy.base.multiarray as M
>     >>> M.__class__
>    <type 'module'>
>     >>>
> I am surprised that this name points to a module.  It usually is an 
> attribute of a class instance which
> points to the class object of that instance.

Why is this surprising?   scipy.base.multiarray is a module, therefore 
it's "class" is type 'module'.  This seems fine to me.   At any rate, 
Python is assigning the __class__ attribute to the extension module 
multiarray, so it is what it is.


More information about the Numpy-discussion mailing list