15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.1.4 Building SciPy<br />

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

Support for NumScons has been added. NumScons is a tentative new build system for NumPy/SciPy, using SCons at<br />

its core.<br />

SCons is a next-generation build system, intended to replace the venerable Make with the integrated functionality<br />

of autoconf/automake and ccache. Scons is written in Python and its configuration files are Python scripts.<br />

NumScons is meant to replace NumPy’s custom version of distutils providing more advanced functionality, such<br />

as autoconf, improved fortran support, more tools, and support for numpy.distutils/scons cooperation.<br />

2.1.5 Sandbox Removed<br />

While porting SciPy to NumPy in 2005, several packages and modules were moved into <strong>scipy</strong>.sandbox. The<br />

sandbox was a staging ground for packages that were undergoing rapid development and whose APIs were in flux. It<br />

was also a place where broken code could live. The sandbox has served its purpose well, but was starting to create<br />

confusion. Thus <strong>scipy</strong>.sandbox was removed. Most of the code was moved into <strong>scipy</strong>, some code was made<br />

into a scikit, and the remaining code was just deleted, as the functionality had been replaced by other code.<br />

2.1.6 Sparse Matrices<br />

Sparse matrices have seen extensive improvements. There is now support for integer dtypes such int8, uint32, etc.<br />

Two new sparse formats were added:<br />

• new class dia_matrix : the sparse DIAgonal format<br />

• new class bsr_matrix : the Block CSR format<br />

Several new sparse matrix construction functions were added:<br />

• sparse.kron : sparse Kronecker product<br />

• sparse.bmat : sparse version of numpy.bmat<br />

• sparse.vstack : sparse version of numpy.vstack<br />

• sparse.hstack : sparse version of numpy.hstack<br />

Extraction of submatrices and nonzero values have been added:<br />

• sparse.tril : extract lower triangle<br />

• sparse.triu : extract upper triangle<br />

• sparse.find : nonzero values and their indices<br />

csr_matrix and csc_matrix now support slicing and fancy indexing (e.g., A[1:3, 4:7] and<br />

A[[3,2,6,8],:]). Conversions among all sparse formats are now possible:<br />

• using member functions such as .tocsr() and .tolil()<br />

• using the .asformat() member function, e.g. A.asformat(’csr’)<br />

• using constructors A = lil_matrix([[1,2]]); B = csr_matrix(A)<br />

All sparse constructors now accept dense matrices and lists of lists. For example:<br />

• A = csr_matrix( rand(3,3) ) and B = lil_matrix( [[1,2],[3,4]] )<br />

The handling of diagonals in the spdiags function has been changed. It now agrees with the MATLAB(TM) function<br />

of the same name.<br />

2.1. SciPy 0.7.0 Release Notes 125

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

Saved successfully!

Ooh no, something went wrong!