SciPy 0.13.0 Release Notes — SciPy v1.14.0 Manual (2024)

SciPy 0.13.0 is the culmination of 7 months of hard work. It containsmany new features, numerous bug-fixes, improved test coverage andbetter documentation. There have been a number of deprecations andAPI changes in this release, which are documented below. All usersare encouraged to upgrade to this release, as there are a large numberof bug-fixes and optimizations. Moreover, our development attentionwill now shift to bug-fix releases on the 0.13.x branch, and on addingnew features on the master branch.

This release requires Python 2.6, 2.7 or 3.1-3.3 and NumPy 1.5.1 or greater.Highlights of this release are:

New features#

scipy.integrate improvements#

N-dimensional numerical integration#

A new function scipy.integrate.nquad, which provides N-dimensionalintegration functionality with a more flexible interface than dblquad andtplquad, has been added.

dopri* improvements#

The intermediate results from the dopri family of ODE solvers can now beaccessed by a solout callback function.

scipy.linalg improvements#

Interpolative decompositions#

Scipy now includes a new module scipy.linalg.interpolativecontaining routines for computing interpolative matrix decompositions(ID). This feature is based on the ID software package byP.G. Martinsson, V. Rokhlin, Y. Shkolnisky, and M. Tygert, previouslyadapted for Python in the PymatrixId package by K.L. Ho.

Polar decomposition#

A new function scipy.linalg.polar, to compute the polar decompositionof a matrix, was added.

BLAS level 3 functions#

The BLAS functions symm, syrk, syr2k, hemm, herk andher2k are now wrapped in scipy.linalg.

Matrix functions#

Several matrix function algorithms have been implemented or updated followingdetailed descriptions in recent papers of Nick Higham and his co-authors.These include the matrix square root (sqrtm), the matrix logarithm(logm), the matrix exponential (expm) and its Frechet derivative(expm_frechet), and fractional matrix powers (fractional_matrix_power).

scipy.optimize improvements#

Trust-region unconstrained minimization algorithms#

The minimize function gained two trust-region solvers for unconstrainedminimization: dogleg and trust-ncg.

scipy.sparse improvements#

Boolean comparisons and sparse matrices#

All sparse matrix types now support boolean data, and boolean operations. Twosparse matrices A and B can be compared in all the expected ways A < B,A >= B, A != B, producing similar results as dense Numpy arrays.Comparisons with dense matrices and scalars are also supported.

CSR and CSC fancy indexing#

Compressed sparse row and column sparse matrix types now support fancy indexingwith boolean matrices, slices, and lists. So where A is a (CSC or CSR) sparsematrix, you can do things like:

>>> A[A > 0.5] = 1 # since Boolean sparse matrices work>>> A[:2, :3] = 2>>> A[[1,2], 2] = 3

scipy.sparse.linalg improvements#

The new function onenormest provides a lower bound of the 1-norm of alinear operator and has been implemented according to Higham and Tisseur(2000). This function is not only useful for sparse matrices, but can also beused to estimate the norm of products or powers of dense matrices withoutexplicitly building the intermediate matrix.

The multiplicative action of the matrix exponential of a linear operator(expm_multiply) has been implemented following the description in Al-Mohyand Higham (2011).

Abstract linear operators (scipy.sparse.linalg.LinearOperator) can now bemultiplied, added to each other, and exponentiated, producing new linearoperators. This enables easier construction of composite linear operations.

scipy.spatial improvements#

The vertices of a ConvexHull can now be accessed via the vertices attribute,which gives proper orientation in 2-D.

scipy.signal improvements#

The cosine window function scipy.signal.cosine was added.

scipy.special improvements#

New functions scipy.special.xlogy and scipy.special.xlog1py were added.These functions can simplify and speed up code that has to calculatex * log(y) and give 0 when x == 0.

scipy.io improvements#

Unformatted Fortran file reader#

The new class scipy.io.FortranFile facilitates reading unformattedsequential files written by Fortran code.

scipy.io.wavfile enhancements#

scipy.io.wavfile.write now accepts a file buffer. Previously it onlyaccepted a filename.

scipy.io.wavfile.read and scipy.io.wavfile.write can now handle floatingpoint WAV files.

scipy.interpolate improvements#

B-spline derivatives and antiderivatives#

scipy.interpolate.splder and scipy.interpolate.splantider functionsfor computing B-splines that represent derivatives and antiderivativesof B-splines were added. These functions are also available in theclass-based FITPACK interface as UnivariateSpline.derivative andUnivariateSpline.antiderivative.

scipy.stats improvements#

Distributions now allow using keyword parameters in addition topositional parameters in all methods.

The function scipy.stats.power_divergence has been added for theCressie-Read power divergence statistic and goodness of fit test.Included in this family of statistics is the “G-test”(https://en.wikipedia.org/wiki/G-test).

scipy.stats.mood now accepts multidimensional input.

An option was added to scipy.stats.wilcoxon for continuity correction.

scipy.stats.chisquare now has an axis argument.

scipy.stats.mstats.chisquare now has axis and ddof arguments.

Deprecated features#

expm2 and expm3#

The matrix exponential functions scipy.linalg.expm2 and scipy.linalg.expm3are deprecated. All users should use the numerically more robustscipy.linalg.expm function instead.

scipy.stats functions#

scipy.stats.oneway is deprecated; scipy.stats.f_oneway should be usedinstead.

scipy.stats.glm is deprecated. scipy.stats.ttest_ind is an equivalentfunction; more full-featured general (and generalized) linear modelimplementations can be found in statsmodels.

scipy.stats.cmedian is deprecated; numpy.median should be used instead.

Backwards incompatible changes#

LIL matrix assignment#

Assigning values to LIL matrices with two index arrays now works similarly asassigning into ndarrays:

>>> x = lil_matrix((3, 3))>>> x[[0,1,2],[0,1,2]]=[0,1,2]>>> x.todense()matrix([[ 0., 0., 0.], [ 0., 1., 0.], [ 0., 0., 2.]])

rather than giving the result:

>>> x.todense()matrix([[ 0., 1., 2.], [ 0., 1., 2.], [ 0., 1., 2.]])

Users relying on the previous behavior will need to revisit their code.The previous behavior is obtained by x[numpy.ix_([0,1,2],[0,1,2])] = ....

Deprecated radon function removed#

The misc.radon function, which was deprecated in scipy 0.11.0, has beenremoved. Users can find a more full-featured radon function inscikit-image.

Removed deprecated keywords xa and xb from stats.distributions#

The keywords xa and xb, which were deprecated since 0.11.0, havebeen removed from the distributions in scipy.stats.

Changes to MATLAB file readers / writers#

The major change is that 1D arrays in numpy now become row vectors (shape 1, N)when saved to a MATLAB 5 format file. Previously 1D arrays saved as columnvectors (N, 1). This is to harmonize the behavior of writing MATLAB 4 and 5formats, and adapt to the defaults of numpy and MATLAB - for examplenp.atleast_2d returns 1D arrays as row vectors.

Trying to save arrays of greater than 2 dimensions in MATLAB 4 format now raisesan error instead of silently reshaping the array as 2D.

scipy.io.loadmat('afile') used to look for afile on the Python system path(sys.path); now loadmat only looks in the current directory for arelative path filename.

Other changes#

Security fix: scipy.weave previously used temporary directories in aninsecure manner under certain circ*mstances.

Cython is now required to build unreleased versions of scipy.The C files generated from Cython sources are not included in the git repoanymore. They are however still shipped in source releases.

The code base received a fairly large PEP8 cleanup. A tox pep8command has been added; new code should pass this test command.

Scipy cannot be compiled with gfortran 4.1 anymore (at least on RH5), likelydue to that compiler version not supporting entry constructs well.

Authors#

This release contains work by the following people (contributed at leastone patch to this release, names in alphabetical order):

  • Jorge Cañardo Alastuey +

  • Tom Aldcroft +

  • Max Bolingbroke +

  • Joseph Jon Booker +

  • François Boulogne

  • Matthew Brett

  • Christian Brodbeck +

  • Per Brodtkorb +

  • Christian Brueffer +

  • Lars Buitinck

  • Evgeni Burovski +

  • Tim Cera

  • Lawrence Chan +

  • David Cournapeau

  • Dražen Lučanin +

  • Alexander J. Dunlap +

  • endolith

  • André Gaul +

  • Christoph Gohlke

  • Ralf Gommers

  • Alex Griffing +

  • Blake Griffith +

  • Charles Harris

  • Bob Helmbold +

  • Andreas Hilboll

  • Kat Huang +

  • Oleksandr (Sasha) Huziy +

  • Gert-Ludwig Ingold +

  • Thouis (Ray) Jones

  • Juan Luis Cano Rodríguez +

  • Robert Kern

  • Andreas Kloeckner +

  • Sytse Knypstra +

  • Gustav Larsson +

  • Denis Laxalde

  • Christopher Lee

  • Tim Leslie

  • Wendy Liu +

  • Clemens Novak +

  • Takuya Oshima +

  • Josef Perktold

  • Illia Polosukhin +

  • Przemek Porebski +

  • Steve Richardson +

  • Branden Rolston +

  • Skipper Seabold

  • Fazlul Shahriar

  • Leo Singer +

  • Rohit Sivaprasad +

  • Daniel B. Smith +

  • Julian Taylor

  • Louis Thibault +

  • Tomas Tomecek +

  • John Travers

  • Richard Tsai +

  • Jacob Vanderplas

  • Patrick Varilly

  • Pauli Virtanen

  • Stefan van der Walt

  • Warren Weckesser

  • Pedro Werneck +

  • Nils Werner +

  • Michael Wimmer +

  • Nathan Woods +

  • Tony S. Yu +

A total of 65 people contributed to this release.People with a “+” by their names contributed a patch for the first time.

SciPy 0.13.0 Release Notes — SciPy v1.14.0 Manual (2024)

References

Top Articles
Latest Posts
Article information

Author: Edwin Metz

Last Updated:

Views: 6180

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.