Skip to content

Latest commit

 

History

History
159 lines (116 loc) · 5.85 KB

0.7.0-notes.rst

File metadata and controls

159 lines (116 loc) · 5.85 KB

SciPy 0.7.0 Release Notes

This is a new stable release. Please note that unlike previous versions of SciPy, this release requires Python 2.4 or greater. This release also requires NumPy 1.2.0 or greater.

Changes

Sparse Matrices

  • added support for integer dtypes such int8, uint32, etc.
  • new class dia_matrix : the sparse DIAgonal format
  • new class bsr_matrix : sparse Block CSR format
  • new sparse matrix construction functions
  • sparse.kron : sparse Kronecker product
  • sparse.bmat : sparse version of numpy.bmat
  • sparse.vstack : sparse version of numpy.vstack
  • sparse.hstack : sparse version of numpy.hstack
  • extraction of submatrices and nonzero values
  • sparse.tril : extract lower triangle
  • sparse.kron : extract upper triangle
  • sparse.find : nonzero values and their indices
  • csr_matrix and csc_matrix now support slicing and fancy indexing
  • e.g. A[1:3, 4:7] and A[[3,2,6,8],:]
  • conversions among all sparse formats are now possible
  • all formats have member functions such as .tocsr() and .tolil()
  • sparse constructors now accept dense matrices and other sparse formats
  • e.g. A = csr_matrix( rand(3,3) ) and B = lil_matrix( [[1,2],[3,4]] )
  • efficiency improvements to:
  • format conversions
  • sparse matrix arithmetic
  • numerous bugfixes

Reworking of IO package

The IO code in both NumPy and SciPy is undergoing a major reworking. NumPy will be where basic code for reading and writing NumPy arrays is located, while SciPy will house file readers and writers for various data formats (data, audio, video, images, matlab, excel, etc.). This reworking started NumPy 1.1.0 and will take place over many release. SciPy 0.7.0 has several changes including:

  • many of the functions in scipy.io have been deprecated
  • the Matlab (TM) file readers/writers have a number of improvements:
  • default version 5

New Hierarchical Clustering module

This module adds new hierarchical clustering functionality to the cluster package. Its interface is similar to the hierarchical clustering functions provided in MATLAB(TM)'s Statistics Toolbox to facilitate easier migration to the NumPy/SciPy framework. Linkage methods implemented include single, complete, average, weighted, centroid, median, and ward. Several functions are provided for computing statistics on clusters including inconsistency statistics, cophenetic distance, and maximum distance of descendants. The fcluster and fclusterdata functions take hierarchical tree clusterings generated by these algorithms, cuts the tree, and labels the flat clusters. The leaders function finds the root of each flat cluster given a hierarchical clustering and labellings of its leaves. Finally, a matplotlib extension is provided for plotting dendrograms, which may be outputted to postscript or any other supported format.

New Spatial package

Collection of spatial algorithms and data structures useful for spatial statistics and clustering applications. Includes fast compiled code for computing exact and approximate nearest neighbors, as well as a pure-python kd-tree with the same interface but that supports annotation and a variety of other algorithms. The API for both modules may change somewhat as user requirements become clearer.

Also includes a submodule distance containing fast code for many definitions of distance between vectors. These common distance functions are useful for for many agorthms including spatial statistics, clustering, and kd-trees. Distance and dissimilarity functions provided include Bray-Curtis, Canberra, Chebyshev, City Block, Cosine, Dice, Euclidean, Hamming, Jaccard, Kulsinski, Mahalanobis, Matching, Minkowski, Rogers-Tanimoto, Russell-Rao, Squared Euclidean, Standardized Euclidean, Sokal-Michener, Sokal-Sneath, and Yule. Two functions are provided for computing distances between collections of vectors: pdist and cdist. pdist is similar to the MATLAB(TM) function and computes pairwise distances between a collection of vectors. cdist computes distances between vectors in two sets of vectors. squareform converts between square distance matrices and condensed distance matrices.

Reworked fftpack package

FFTW2, FFTW3, MKL and DJBFFT wrappers have been removed. Only (NETLIB) fftpack remains. By focusing on one backend, we hope to add new features -- like float32 support -- more easily.

New Constants package

Collection of physical constants and conversion factors.

New Radial Basis Function module

http://scipy.org/scipy/scipy/browser/trunk/scipy/interpolate/rbf.py

New complex ODE integrator

scipy.integrate.ode now contains a wrapper for the ZVODE complex-valued ordinary differential equation solver (by Peter N. Brown, Alan C. Hindmarsh, and George D. Byrne).

Major documentation improvements

TODO

Bug fixes in the interpolation package

The shape of return values from scipy.interpolate.interp1d used to be incorrect if interpolated data had more than 2 dimensions and the axis keyword was set to a non-default value. This is fixed in 0.7.0:

http://projects.scipy.org/scipy/scipy/ticket/289 http://projects.scipy.org/scipy/scipy/ticket/660

Users of scipy.interpolate.interp1d may need to revise their code if it relies on the incorrect behavior.

Running Tests

We are moving away from having our own testing framework and are adopting nose <http://code.google.com/p/python-nose/>.

Building SciPy

Support for NumScons has been added. NumScons is a tentative new build system for NumPy/SciPy, using scons at its core.