[Numpy-discussion] matrix vs. array
Arnd Baecker
arnd.baecker at web.de
Wed Mar 15 01:52:01 EST 2006
On Wed, 15 Mar 2006, Bill Baxter wrote:
> Inspect is a really handy python module:
> import inspect
> import numpy
> print inspect.getsource(numpy.matrix)
Another very nice option is to use ipython:
ipython
In [1]: import numpy
In [2]: numpy.matrix?
In [2]: numpy.matrix??
One ? gives some basic information:
Type: type
Base Class: <type 'type'>
String Form: <class 'numpy.core.defmatrix.matrix'>
Namespace: Interactive
File:
/home/abaecker/BUILDS3/BuildDir/inst_numpy/lib/python2.4/site-packages/numpy/core/defmatrix.py
(and normally a doc-string, if there is one)
and ?? shows you the code.
Best, Arnd
More information about the NumPy-Discussion
mailing list