SciPy 0.8.0 is the culmination of 17 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Moreover, our development attention will now shift to bug-fix releases on the 0.8.x branch, and on adding new features on the development trunk. This release requires Python 2.4 - 2.6 and NumPy 1.4.1 or greater.
Please note that SciPy is still considered to have “Beta” status, as we work toward a SciPy 1.0.0 release. The 1.0.0 release will mark a major milestone in the development of SciPy, after which changing the package structure or API will be much more difficult. Whilst these pre-1.0 releases are considered to have “Beta” status, we are committed to making them as bug-free as possible.
However, until the 1.0 release, we are aggressively reviewing and refining the functionality, organization, and interface. This is being done in an effort to make the package as coherent, intuitive, and useful as possible. To achieve this, we need help from the community of users. Specifically, we need feedback regarding all aspects of the project - everything - from which algorithms we implement, to details about our function’s call signatures.
Python 3 compatibility is planned and is currently technically feasible, since Numpy has been ported. However, since the Python 3 compatible Numpy 1.5 has not been released yet, support for Python 3 in Scipy is not yet included in Scipy 0.8. SciPy 0.9, planned for fall 2010, will very likely include experimental support for Python 3.
Concern correlate, correlate2d, convolve and convolve2d. If the second input is larger than the first input, the inputs are swapped before calling the underlying computation routine. This behavior is deprecated, and will be removed in scipy 0.9.0.
The modules helpmod, ppimport and pexec from
scipy.misc are deprecated.
They will be removed from SciPy in version 0.9.
linalg: The function solveh_banded currently returns a tuple containing the Cholesky factorization and the solution to the linear system. In SciPy 0.9, the return value will be just the solution.
The function constants.codata.find will generate a DeprecationWarning. In Scipy version 0.8.0, the keyword argument ‘disp’ was added to the function, with the default value ‘True’. In 0.9.0, the default will be ‘False’.
The qshape keyword argument of signal.chirp is deprecated. Use the argument vertex_zero instead.
Passing the coefficients of a polynomial as the argument f0 to signal.chirp is deprecated. Use the function signal.sweep_poly instead.
The io.recaster module has been deprecated and will be removed in 0.9.0.
New realtransforms have been added, namely dct and idct for Discrete Cosine Transform; type I, II and III are available.
fft functions can now handle single precision inputs as well: fft(x) will return a single precision array if x is single precision.
At the moment, for FFT sizes that are not composites of 2, 3, and 5, the transform is computed internally in double precision to avoid rounding error in FFTPACK.
The outputs should now correspond to their matlab and R counterparts, and do what most people expect if the old_behavior=False argument is passed:
correlate, convolve and their 2d counterparts do not swap their inputs depending on their relative shape anymore;
correlation functions now conjugate their second argument while computing the slided sum-products, which correspond to the usual definition of correlation.
Several improvements to the chirp function in
scipy.signal were made:
The waveform generated when method=”logarithmic” was corrected; it now generates a waveform that is also known as an “exponential” or “geometric” chirp. (See https://en.wikipedia.org/wiki/Chirp.)
A new chirp method, “hyperbolic”, was added.
Instead of the keyword qshape, chirp now uses the keyword vertex_zero, a boolean.
chirp no longer handles an arbitrary polynomial. This functionality has been moved to a new function, sweep_poly.
A new function, sweep_poly, was added.
The functions cho_solve_banded, circulant, companion, hadamard and
leslie were added to
The function block_diag was enhanced to accept scalar and 1D arguments, along with the usual 2D arguments.
The curve_fit function has been added; it takes a function and uses non-linear least squares to fit that to the provided data.
The leastsq and fsolve functions now return an array of size one instead of a scalar when solving for a single parameter.
A naive implementation of SVD for sparse matrices is available in scipy.sparse.linalg.eigen.arpack. It is based on using an symmetric solver on <A, A>, and as such may not be very precise.
The keyword argument disp was added to the function
with the default value True. When disp is True, the behavior is the
same as in Scipy version 0.7. When False, the function returns the list of
keys instead of printing them. (In SciPy version 0.9, the default will be
Scipy now wraps SuperLU version 4.0, which supports incomplete sparse LU
decompositions. These can be accessed via
Upgrade to SuperLU 4.0 also fixes some known bugs.
We’ve rewritten the matlab file reader in Cython and it should now read matlab files at around the same speed that Matlab does.
The reader reads matlab named and anonymous functions, but it can’t write them.
Until scipy 0.8.0 we have returned arrays of matlab structs as numpy
object arrays, where the objects have attributes named for the struct
fields. As of 0.8.0, we return matlab structs as numpy structured
arrays. You can get the older behavior by using the optional
struct_as_record=False keyword argument to
There is an inconsistency in the matlab file writer, in that it writes
numpy 1D arrays as column vectors in matlab 5 files, and row vectors in
matlab 4 files. We will change this in the next version, so both write
row vectors. There is a FutureWarning when calling the writer to warn
of this change; for now we suggest using the
scipy.io.savemat and friends.
Values of orthogonal polynomials can be evaluated with new vectorized functions
scipy.special: eval_legendre, eval_chebyt, eval_chebyu,
eval_chebyc, eval_chebys, eval_jacobi, eval_laguerre,
eval_genlaguerre, eval_hermite, eval_hermitenorm,
eval_gegenbauer, eval_sh_legendre, eval_sh_chebyt,
eval_sh_chebyu, eval_sh_jacobi. This is faster than constructing the
full coefficient representation of the polynomials, which was previously the
only available way.
Note that the previous orthogonal polynomial routines will now also invoke this feature, when possible.
scipy.special.hyp2f1 for real parameters was revised.
The new version should produce accurate values for all real parameters.
scipy.interpolate.Rbf class now accepts a callable as input for the
“function” argument, in addition to the built-in radial basis functions which
can be selected with a string argument.
scipy.stsci: the package was removed
The module scipy.misc.limits was removed.
The IO code in both NumPy and SciPy is being extensively reworked. 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, etc.).
Several functions in
scipy.io are removed in the 0.8.0 release including:
npfile, save, load, create_module, create_shelf,
objload, objsave, fopen, read_array, write_array,
fread, fwrite, bswap, packbits, unpackbits, and
convert_objectarray. Some of these functions have been replaced by NumPy’s
raw reading and writing capabilities, memory-mapping capabilities, or array
methods. Others have been moved from SciPy to NumPy, since basic array reading
and writing capability is now handled by NumPy.