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 />

sparsefeatures(f, x, format=’csc_matrix’)<br />

Returns an Mx1 sparse matrix of non-zero evaluations of the scalar functions f_1,...,f_m in the list f at the point<br />

x.<br />

If format=’ll_mat’, the PySparse module (or a symlink to it) must be available in the Python site-packages/ directory.<br />

A trimmed-down version, patched for NumPy compatibility, is available in the SciPy sandbox/pysparse<br />

directory.<br />

3.9 Miscellaneous routines (<strong>scipy</strong>.misc)<br />

Warning: This documentation is work-in-progress and unorganized.<br />

Various utilities that don’t have another home.<br />

who(vardict=None)<br />

Print the Numpy arrays in the given dictionary.<br />

If there is no dictionary passed in or vardict is None then returns Numpy arrays in the globals() dictionary (all<br />

Numpy arrays in the namespace).<br />

Notes<br />

Parameters<br />

vardict : dict, optional<br />

Returns<br />

out : None<br />

A dictionary possibly containing ndarrays. Default is globals().<br />

Returns ‘None’.<br />

Prints out the name, shape, bytes and type of all of the ndarrays present in vardict.<br />

Examples<br />

>>> a = np.arange(10)<br />

>>> b = np.ones(20)<br />

>>> np.who()<br />

Name Shape Bytes Type<br />

===========================================================<br />

a 10 40 int32<br />

b 20 160 float64<br />

Upper bound on total bytes = 200<br />

>>> d = {’x’: np.arange(2.0), ’y’: np.arange(3.0), ’txt’: ’Some str’,<br />

... ’idx’:5}<br />

>>> np.whos(d)<br />

Name Shape Bytes Type<br />

===========================================================<br />

y 3 24 float64<br />

x 2 16 float64<br />

Upper bound on total bytes = 40<br />

source(object, output=)<br />

Print or write to a file the source code for a Numpy object.<br />

3.9. Miscellaneous routines (<strong>scipy</strong>.misc) 261

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

Saved successfully!

Ooh no, something went wrong!