[Numpy-discussion] Dcoument strings for ndarray
Colin J. Williams
cjw at sympatico.ca
Sat Oct 8 09:44:34 EDT 2005
With a view to exploring Numeric3, below is a script to check the
availability of doc strings.
Some are not yet available.
There is a method __class__ module but the purpose is not clear.
Colin W.
# checkDocs.py
''' To check the availabilty of doc strings for the ndarray class.
Among the attributes of ndarray is:
__class__ module(name[, doc])
Create a module object.
The name must be a string; the optional doc argument can have any type.
ndarray is referenced as a class and reported as "<type 'type'>"
but the common Python usage is <type 'classobj'>
see the last output line.
'''
import scipy.base.multiarray as M
print type(M.ndarray)
print '>', type( M)
print 'module doc:', M.__doc__
for i in dir(M.ndarray):
print i,
try:
print eval('M.'+i+'.__doc__')
except:
print 'No doc'
print '\n', M.ndarray.__doc__
print type(M.ndarray)
# Check normal usage
import timeit
print timeit.Timer, type(timeit.Timer)
More information about the NumPy-Discussion
mailing list