15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SciPy Reference Guide, Release 0.8.dev<br />

The source code is only returned for objects written in Python. Many functions and classes are defined in C and<br />

will therefore not return useful information.<br />

See Also:<br />

Parameters<br />

object : numpy object<br />

lookfor, info<br />

Examples<br />

Input object. This can be any object (function, class, module, ...).<br />

output : file object, optional<br />

If output not supplied then source code is printed to screen (sys.stdout). File object<br />

must be created with either write ‘w’ or append ‘a’ modes.<br />

>>> np.source(np.interp)<br />

In file: /usr/lib/python2.6/dist-packages/numpy/lib/function_base.py<br />

def interp(x, xp, fp, left=None, right=None):<br />

""".... (full docstring printed)"""<br />

if isinstance(x, (float, int, number)):<br />

return compiled_interp([x], xp, fp, left, right).item()<br />

else:<br />

return compiled_interp(x, xp, fp, left, right)<br />

The source code is only returned for objects written in Python.<br />

>>> np.source(np.array)<br />

Not available for this object.<br />

info(object=None, maxwidth=76, output=,<br />

toplevel=’<strong>scipy</strong>’)<br />

Get help information for a function, class, or module.<br />

See Also:<br />

Parameters<br />

object : object or str, optional<br />

source, lookfor<br />

Input object or name to get information about. If object is a numpy object, its docstring<br />

is given. If it is a string, available modules are searched for matching objects.<br />

If None, information about info itself is returned.<br />

maxwidth : int, optional<br />

Printing width.<br />

output : file like object, optional<br />

File like object that the output is written to, default is stdout. The object has to be<br />

opened in ‘w’ or ‘a’ mode.<br />

toplevel : str, optional<br />

Start search at this level.<br />

262 Chapter 3. Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!