Skip to content

Releases: scipy/scipy

SciPy 1.3.0rc2

09 May 18:13
v1.3.0rc2
Compare
Choose a tag to compare
SciPy 1.3.0rc2 Pre-release
Pre-release

SciPy 1.3.0 Release Notes

Note: Scipy 1.3.0 is not released yet!

SciPy 1.3.0 is the culmination of 5 months of hard work. It contains
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been some 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. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with python -Wd and check for DeprecationWarning s).
Our development attention will now shift to bug-fix releases on the
1.3.x branch, and on adding new features on the master branch.

This release requires Python 3.5+ and NumPy 1.13.3 or greater.

For running on PyPy, PyPy3 6.0+ and NumPy 1.15.0 are required.

Highlights of this release

  • Three new stats functions, a rewrite of pearsonr, and an exact
    computation of the Kolmogorov-Smirnov two-sample test
  • A new Cython API for bounded scalar-function root-finders in scipy.optimize
  • Substantial CSR and CSC sparse matrix indexing performance
    improvements
  • Added support for interpolation of rotations with continuous angular
    rate and acceleration in RotationSpline

New features

scipy.interpolate improvements

A new class CubicHermiteSpline is introduced. It is a piecewise-cubic
interpolator which matches observed values and first derivatives. Existing
cubic interpolators CubicSpline, PchipInterpolator and
Akima1DInterpolator were made subclasses of CubicHermiteSpline.

scipy.io improvements

For the Attribute-Relation File Format (ARFF) scipy.io.arff.loadarff
now supports relational attributes.

scipy.io.mmread can now parse Matrix Market format files with empty lines.

scipy.linalg improvements

Added wrappers for ?syconv routines, which convert a symmetric matrix
given by a triangular matrix factorization into two matrices and vice versa.

scipy.linalg.clarkson_woodruff_transform now uses an algorithm that leverages
sparsity. This may provide a 60-90 percent speedup for dense input matrices.
Truly sparse input matrices should also benefit from the improved sketch
algorithm, which now correctly runs in O(nnz(A)) time.

Added new functions to calculate symmetric Fiedler matrices and
Fiedler companion matrices, named scipy.linalg.fiedler and
scipy.linalg.fiedler_companion, respectively. These may be used
for root finding.

scipy.ndimage improvements

Gaussian filter performances may improve by an order of magnitude in
some cases, thanks to removal of a dependence on np.polynomial. This
may impact scipy.ndimage.gaussian_filter for example.

scipy.optimize improvements

The scipy.optimize.brute minimizer obtained a new keyword workers, which
can be used to parallelize computation.

A Cython API for bounded scalar-function root-finders in scipy.optimize
is available in a new module scipy.optimize.cython_optimize via cimport.
This API may be used with nogil and prange to loop
over an array of function arguments to solve for an array of roots more
quickly than with pure Python.

'interior-point' is now the default method for linprog, and
'interior-point' now uses SuiteSparse for sparse problems when the
required scikits (scikit-umfpack and scikit-sparse) are available.
On benchmark problems (gh-10026), execution time reductions by factors of 2-3
were typical. Also, a new method='revised simplex' has been added.
It is not as fast or robust as method='interior-point', but it is a faster,
more robust, and equally accurate substitute for the legacy
method='simplex'.

differential_evolution can now use a Bounds class to specify the
bounds for the optimizing argument of a function.

scipy.optimize.dual_annealing performance improvements related to
vectorisation of some internal code.

scipy.signal improvements

Two additional methods of discretization are now supported by
scipy.signal.cont2discrete: impulse and foh.

scipy.signal.firls now uses faster solvers

scipy.signal.detrend now has a lower physical memory footprint in some
cases, which may be leveraged using the new overwrite_data keyword argument

scipy.signal.firwin pass_zero argument now accepts new string arguments
that allow specification of the desired filter type: 'bandpass',
'lowpass', 'highpass', and 'bandstop'

scipy.signal.sosfilt may have improved performance due to lower retention
of the global interpreter lock (GIL) in algorithm

scipy.sparse improvements

A new keyword was added to csgraph.dijsktra that
allows users to query the shortest path to ANY of the passed in indices,
as opposed to the shortest path to EVERY passed index.

scipy.sparse.linalg.lsmr performance has been improved by roughly 10 percent
on large problems

Improved performance and reduced physical memory footprint of the algorithm
used by scipy.sparse.linalg.lobpcg

CSR and CSC sparse matrix fancy indexing performance has been
improved substantially

scipy.spatial improvements

scipy.spatial.ConvexHull now has a good attribute that can be used
alongsize the QGn Qhull options to determine which external facets of a
convex hull are visible from an external query point.

scipy.spatial.cKDTree.query_ball_point has been modernized to use some newer
Cython features, including GIL handling and exception translation. An issue
with return_sorted=True and scalar queries was fixed, and a new mode named
return_length was added. return_length only computes the length of the
returned indices list instead of allocating the array every time.

scipy.spatial.transform.RotationSpline has been added to enable interpolation
of rotations with continuous angular rates and acceleration

scipy.stats improvements

Added a new function to compute the Epps-Singleton test statistic,
scipy.stats.epps_singleton_2samp, which can be applied to continuous and
discrete distributions.

New functions scipy.stats.median_absolute_deviation and scipy.stats.gstd
(geometric standard deviation) were added. The scipy.stats.combine_pvalues
method now supports pearson, tippett and mudholkar_george pvalue
combination methods.

The scipy.stats.ortho_group and scipy.stats.special_ortho_group
rvs(dim) functions' algorithms were updated from a O(dim^4)
implementation to a O(dim^3) which gives large speed improvements
for dim>100.

A rewrite of scipy.stats.pearsonr to use a more robust algorithm,
provide meaningful exceptions and warnings on potentially pathological input,
and fix at least five separate reported issues in the original implementation.

Improved the precision of hypergeom.logcdf and hypergeom.logsf.

Added exact computation for Kolmogorov-Smirnov (KS) two-sample test, replacing
the previously approximate computation for the two-sided test stats.ks_2samp.
Also added a one-sided, two-sample KS test, and a keyword alternative to
stats.ks_2samp.

Backwards incompatible changes

scipy.interpolate changes

Functions from scipy.interpolate (spleval, spline, splmake,
and spltopp) and functions from scipy.misc (bytescale,
fromimage, imfilter, imread, imresize, imrotate,
imsave, imshow, toimage) have been removed. The former set has
been deprecated since v0.19.0 and the latter has been deprecated since v1.0.0.
Similarly, aliases from scipy.misc (comb, factorial,
factorial2, factorialk, logsumexp, pade, info, source,
who) which have been deprecated since v1.0.0 are removed.
SciPy documentation for v1.1.0 <https://docs.scipy.org/doc/scipy-1.1.0/reference/misc.html>__
can be used to track the new import locations for the relocated functions.

scipy.linalg changes

For pinv, pinv2, and pinvh, the default cutoff values are changed
for consistency (see the docs for the actual values).

scipy.stats changes

Previously, ks_2samp(data1, data2) would run a two-sided test and return
the approximated p-value. The new signature, ks_2samp(data1, data2, alternative="two-sided", method="auto"), still runs the two-sided test by
default but returns the exact p-value for small samples and the approximated
value for large samples. method="asymp" would be equivalent to the
old version but auto is the better choice.

Other changes

Our tutorial has been expanded with a new section on global optimizers

There has been a rework of the stats.distributions tutorials.

scipy.optimize now correctly sets the convergence flag of the result to
CONVERR, a convergence error, for bounded scalar-function root-finders
if the maximum iterations has been exceeded, disp is false, and
full_output is true.

scipy.optimize.curve_fit no longer fails if xdata and ydata dtypes
differ; they are both now automatically cast to float64.

scipy.ndimage functions including binary_erosion, binary_closing, and
binary_dilation now require an integer value for the number of iterations,
which alleviates a number of re...

Read more

SciPy 1.3.0rc1

27 Apr 01:01
v1.3.0rc1
Compare
Choose a tag to compare
SciPy 1.3.0rc1 Pre-release
Pre-release

SciPy 1.3.0 Release Notes

Note: Scipy 1.3.0 is not released yet!

SciPy 1.3.0 is the culmination of 5 months of hard work. It contains
many new features, numerous bug-fixes, improved test coverage and better
documentation. There have been some 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. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with python -Wd and check for DeprecationWarning s).
Our development attention will now shift to bug-fix releases on the
1.3.x branch, and on adding new features on the master branch.

This release requires Python 3.5+ and NumPy 1.13.3 or greater.

For running on PyPy, PyPy3 6.0+ and NumPy 1.15.0 are required.

Highlights of this release

  • Three new stats functions, a rewrite of pearsonr, and an exact
    computation of the Kolmogorov-Smirnov two-sample test
  • A new Cython API for bounded scalar-function root-finders in scipy.optimize
  • Substantial CSR and CSC sparse matrix indexing performance
    improvements
  • Added support for interpolation of rotations with continuous angular
    rate and acceleration in RotationSpline

New features

scipy.interpolate improvements

A new class CubicHermiteSpline is introduced. It is a piecewise-cubic
interpolator which matches observed values and first derivatives. Existing
cubic interpolators CubicSpline, PchipInterpolator and
Akima1DInterpolator were made subclasses of CubicHermiteSpline.

scipy.io improvements

For the Attribute-Relation File Format (ARFF) scipy.io.arff.loadarff
now supports relational attributes.

scipy.io.mmread can now parse Matrix Market format files with empty lines.

scipy.linalg improvements

Added wrappers for ?syconv routines, which convert a symmetric matrix
given by a triangular matrix factorization into two matrices and vice versa.

scipy.linalg.clarkson_woodruff_transform now uses an algorithm that leverages
sparsity. This may provide a 60-90 percent speedup for dense input matrices.
Truly sparse input matrices should also benefit from the improved sketch
algorithm, which now correctly runs in O(nnz(A)) time.

Added new functions to calculate symmetric Fiedler matrices and
Fiedler companion matrices, named scipy.linalg.fiedler and
scipy.linalg.fiedler_companion, respectively. These may be used
for root finding.

scipy.ndimage improvements

Gaussian filter performances may improve by an order of magnitude in
some cases, thanks to removal of a dependence on np.polynomial. This
may impact scipy.ndimage.gaussian_filter for example.

scipy.optimize improvements

The scipy.optimize.brute minimizer obtained a new keyword workers, which
can be used to parallelize computation.

A Cython API for bounded scalar-function root-finders in scipy.optimize
is available in a new module scipy.optimize.cython_optimize via cimport.
This API may be used with nogil and prange to loop
over an array of function arguments to solve for an array of roots more
quickly than with pure Python.

'interior-point' is now the default method for linprog, and
'interior-point' now uses SuiteSparse for sparse problems when the
required scikits (scikit-umfpack and scikit-sparse) are available.
On benchmark problems (gh-10026), execution time reductions by factors of 2-3
were typical. Also, a new method='revised simplex' has been added.
It is not as fast or robust as method='interior-point', but it is a faster,
more robust, and equally accurate substitute for the legacy
method='simplex'.

differential_evolution can now use a Bounds class to specify the
bounds for the optimizing argument of a function.

scipy.optimize.dual_annealing performance improvements related to
vectorisation of some internal code.

scipy.signal improvements

Two additional methods of discretization are now supported by
scipy.signal.cont2discrete: impulse and foh.

scipy.signal.firls now uses faster solvers

scipy.signal.detrend now has a lower physical memory footprint in some
cases, which may be leveraged using the new overwrite_data keyword argument

scipy.signal.firwin pass_zero argument now accepts new string arguments
that allow specification of the desired filter type: 'bandpass',
'lowpass', 'highpass', and 'bandstop'

scipy.signal.sosfilt may have improved performance due to lower retention
of the global interpreter lock (GIL) in algorithm

scipy.sparse improvements

A new keyword was added to csgraph.dijsktra that
allows users to query the shortest path to ANY of the passed in indices,
as opposed to the shortest path to EVERY passed index.

scipy.sparse.linalg.lsmr performance has been improved by roughly 10 percent
on large problems

Improved performance and reduced physical memory footprint of the algorithm
used by scipy.sparse.linalg.lobpcg

CSR and CSC sparse matrix fancy indexing performance has been
improved substantially

scipy.spatial improvements

scipy.spatial.ConvexHull now has a good attribute that can be used
alongsize the QGn Qhull options to determine which external facets of a
convex hull are visible from an external query point.

scipy.spatial.cKDTree.query_ball_point has been modernized to use some newer
Cython features, including GIL handling and exception translation. An issue
with return_sorted=True and scalar queries was fixed, and a new mode named
return_length was added. return_length only computes the length of the
returned indices list instead of allocating the array every time.

scipy.spatial.transform.RotationSpline has been added to enable interpolation
of rotations with continuous angular rates and acceleration

scipy.stats improvements

Added a new function to compute the Epps-Singleton test statistic,
scipy.stats.epps_singleton_2samp, which can be applied to continuous and
discrete distributions.

New functions scipy.stats.median_absolute_deviation and scipy.stats.gstd
(geometric standard deviation) were added. The scipy.stats.combine_pvalues
method now supports pearson, tippett and mudholkar_george pvalue
combination methods.

The scipy.stats.ortho_group and scipy.stats.special_ortho_group
rvs(dim) functions' algorithms were updated from a O(dim^4)
implementation to a O(dim^3) which gives large speed improvements
for dim>100.

A rewrite of scipy.stats.pearsonr to use a more robust algorithm,
provide meaningful exceptions and warnings on potentially pathological input,
and fix at least five separate reported issues in the original implementation.

Improved the precision of hypergeom.logcdf and hypergeom.logsf.

Added exact computation for Kolmogorov-Smirnov (KS) two-sample test, replacing
the previously approximate computation for the two-sided test stats.ks_2samp.
Also added a one-sided, two-sample KS test, and a keyword alternative to
stats.ks_2samp.

Backwards incompatible changes

scipy.interpolate changes

Functions from scipy.interpolate (spleval, spline, splmake,
and spltopp) and functions from scipy.misc (bytescale,
fromimage, imfilter, imread, imresize, imrotate,
imsave, imshow, toimage) have been removed. The former set has
been deprecated since v0.19.0 and the latter has been deprecated since v1.0.0.
Similarly, aliases from scipy.misc (comb, factorial,
factorial2, factorialk, logsumexp, pade, info, source,
who) which have been deprecated since v1.0.0 are removed.
SciPy documentation for v1.1.0 <https://docs.scipy.org/doc/scipy-1.1.0/reference/misc.html>__
can be used to track the new import locations for the relocated functions.

scipy.linalg changes

For pinv, pinv2, and pinvh, the default cutoff values are changed
for consistency (see the docs for the actual values).

scipy.stats changes

Previously, ks_2samp(data1, data2) would run a two-sided test and return
the approximated p-value. The new signature, ks_2samp(data1, data2, alternative="two-sided", method="auto"), still runs the two-sided test by
default but returns the exact p-value for small samples and the approximated
value for large samples. method="asymp" would be equivalent to the
old version but auto is the better choice.

Other changes

Our tutorial has been expanded with a new section on global optimizers

There has been a rework of the stats.distributions tutorials.

scipy.optimize now correctly sets the convergence flag of the result to
CONVERR, a convergence error, for bounded scalar-function root-finders
if the maximum iterations has been exceeded, disp is false, and
full_output is true.

scipy.optimize.curve_fit no longer fails if xdata and ydata dtypes
differ; they are both now automatically cast to float64.

scipy.ndimage functions including binary_erosion, binary_closing, and
binary_dilation now require an integer value for the number of iterations,
which alleviates a number of re...

Read more

SciPy 1.2.1

09 Feb 05:52
v1.2.1
c3fa90d
Compare
Choose a tag to compare

SciPy 1.2.1 Release Notes

SciPy 1.2.1 is a bug-fix release with no new features compared to 1.2.0.
Most importantly, it solves the issue that 1.2.0 cannot be installed
from source on Python 2.7 because of non-ASCII character issues.

It is also notable that SciPy 1.2.1 wheels were built with OpenBLAS
0.3.5.dev, which may alleviate some linear algebra issues observed
in SciPy 1.2.0.

Authors

  • Eric Larson
  • Mark Mikofski
  • Evgeni Burovski
  • Ralf Gommers
  • Eric Moore
  • Tyler Reddy

SciPy 1.2.0

18 Dec 04:38
v1.2.0
Compare
Choose a tag to compare

SciPy 1.2.0 Release Notes

SciPy 1.2.0 is the culmination of 6 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. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with python -Wd and check for DeprecationWarning s).
Our development attention will now shift to bug-fix releases on the
1.2.x branch, and on adding new features on the master branch.

This release requires Python 2.7 or 3.4+ and NumPy 1.8.2 or greater.

Note: This will be the last SciPy release to support Python 2.7.
Consequently, the 1.2.x series will be a long term support (LTS)
release; we will backport bug fixes until 1 Jan 2020.

For running on PyPy, PyPy3 6.0+ and NumPy 1.15.0 are required.

Highlights of this release

  • 1-D root finding improvements with a new solver, toms748, and a new
    unified interface, root_scalar
  • New dual_annealing optimization method that combines stochastic and
    local deterministic searching
  • A new optimization algorithm, shgo (simplicial homology
    global optimization) for derivative free optimization problems
  • A new category of quaternion-based transformations are available in
    scipy.spatial.transform

New features

scipy.ndimage improvements

Proper spline coefficient calculations have been added for the mirror,
wrap, and reflect modes of scipy.ndimage.rotate

scipy.fftpack improvements

DCT-IV, DST-IV, DCT-I, and DST-I orthonormalization are now supported in
scipy.fftpack.

scipy.interpolate improvements

scipy.interpolate.pade now accepts a new argument for the order of the
numerator

scipy.cluster improvements

scipy.cluster.vq.kmeans2 gained a new initialization method, kmeans++.

scipy.special improvements

The function softmax was added to scipy.special.

scipy.optimize improvements

The one-dimensional nonlinear solvers have been given a unified interface
scipy.optimize.root_scalar, similar to the scipy.optimize.root interface
for multi-dimensional solvers. scipy.optimize.root_scalar(f, bracket=[a ,b], method="brenth") is equivalent to scipy.optimize.brenth(f, a ,b). If no
method is specified, an appropriate one will be selected based upon the
bracket and the number of derivatives available.

The so-called Algorithm 748 of Alefeld, Potra and Shi for root-finding within
an enclosing interval has been added as scipy.optimize.toms748. This provides
guaranteed convergence to a root with convergence rate per function evaluation
of approximately 1.65 (for sufficiently well-behaved functions.)

differential_evolution now has the updating and workers keywords.
The first chooses between continuous updating of the best solution vector (the
default), or once per generation. Continuous updating can lead to faster
convergence. The workers keyword accepts an int or map-like callable,
and parallelises the solver (having the side effect of updating once per
generation). Supplying an int evaluates the trial solutions in N parallel
parts. Supplying a map-like callable allows other parallelisation approaches
(such as mpi4py, or joblib) to be used.

dual_annealing (and shgo below) is a powerful new general purpose
global optizimation (GO) algorithm. dual_annealing uses two annealing
processes to accelerate the convergence towards the global minimum of an
objective mathematical function. The first annealing process controls the
stochastic Markov chain searching and the second annealing process controls the
deterministic minimization. So, dual annealing is a hybrid method that takes
advantage of stochastic and local deterministic searching in an efficient way.

shgo (simplicial homology global optimization) is a similar algorithm
appropriate for solving black box and derivative free optimization (DFO)
problems. The algorithm generally converges to the global solution in finite
time. The convergence holds for non-linear inequality and
equality constraints. In addition to returning a global minimum, the
algorithm also returns any other global and local minima found after every
iteration. This makes it useful for exploring the solutions in a domain.

scipy.optimize.newton can now accept a scalar or an array

MINPACK usage is now thread-safe, such that MINPACK + callbacks may
be used on multiple threads.

scipy.signal improvements

Digital filter design functions now include a parameter to specify the sampling
rate. Previously, digital filters could only be specified using normalized
frequency, but different functions used different scales (e.g. 0 to 1 for
butter vs 0 to π for freqz), leading to errors and confusion. With
the fs parameter, ordinary frequencies can now be entered directly into
functions, with the normalization handled internally.

find_peaks and related functions no longer raise an exception if the
properties of a peak have unexpected values (e.g. a prominence of 0). A
PeakPropertyWarning is given instead.

The new keyword argument plateau_size was added to find_peaks.
plateau_size may be used to select peaks based on the length of the
flat top of a peak.

welch() and csd() methods in scipy.signal now support calculation
of a median average PSD, using average='mean' keyword

scipy.sparse improvements

The scipy.sparse.bsr_matrix.tocsr method is now implemented directly instead
of converting via COO format, and the scipy.sparse.bsr_matrix.tocsc method
is now also routed via CSR conversion instead of COO. The efficiency of both
conversions is now improved.

The issue where SuperLU or UMFPACK solvers crashed on matrices with
non-canonical format in scipy.sparse.linalg was fixed. The solver wrapper
canonicalizes the matrix if necessary before calling the SuperLU or UMFPACK
solver.

The largest option of scipy.sparse.linalg.lobpcg() was fixed to have
a correct (and expected) behavior. The order of the eigenvalues was made
consistent with the ARPACK solver (eigs()), i.e. ascending for the
smallest eigenvalues, and descending for the largest eigenvalues.

The scipy.sparse.random function is now faster and also supports integer and
complex values by passing the appropriate value to the dtype argument.

scipy.spatial improvements

The function scipy.spatial.distance.jaccard was modified to return 0 instead
of np.nan when two all-zero vectors are compared.

Support for the Jensen Shannon distance, the square-root of the divergence, has
been added under scipy.spatial.distance.jensenshannon

An optional keyword was added to the function
scipy.spatial.cKDTree.query_ball_point() to sort or not sort the returned
indices. Not sorting the indices can speed up calls.

A new category of quaternion-based transformations are available in
scipy.spatial.transform, including spherical linear interpolation of
rotations (Slerp), conversions to and from quaternions, Euler angles,
and general rotation and inversion capabilities
(spatial.transform.Rotation), and uniform random sampling of 3D
rotations (spatial.transform.Rotation.random).

scipy.stats improvements

The Yeo-Johnson power transformation is now supported (yeojohnson,
yeojohnson_llf, yeojohnson_normmax, yeojohnson_normplot). Unlike
the Box-Cox transformation, the Yeo-Johnson transformation can accept negative
values.

Added a general method to sample random variates based on the density only, in
the new function rvs_ratio_uniforms.

The Yule-Simon distribution (yulesimon) was added -- this is a new
discrete probability distribution.

stats and mstats now have access to a new regression method,
siegelslopes, a robust linear regression algorithm

scipy.stats.gaussian_kde now has the ability to deal with weighted samples,
and should have a modest improvement in performance

Levy Stable Parameter Estimation, PDF, and CDF calculations are now supported
for scipy.stats.levy_stable.

The Brunner-Munzel test is now available as brunnermunzel in stats
and mstats

scipy.linalg improvements

scipy.linalg.lapack now exposes the LAPACK routines using the Rectangular
Full Packed storage (RFP) for upper triangular, lower triangular, symmetric,
or Hermitian matrices; the upper trapezoidal fat matrix RZ decomposition
routines are now available as well.

Deprecated features

The functions hyp2f0, hyp1f2 and hyp3f0 in scipy.special have
been deprecated.

Backwards incompatible changes

LAPACK version 3.4.0 or later is now required. Building with
Apple Accelerate is no longer supported.

The function scipy.linalg.subspace_angles(A, B) now gives correct
results for all angles. Before this, the function only returned
correct values for those angles which were greater than pi/4.

Support for the Bento build system has been removed. Bento has not been
maintained for several years, and did not have good Python 3 or wheel support,
hence i...

Read more

SciPy 1.2.0rc2

05 Dec 18:17
v1.2.0rc2
Compare
Choose a tag to compare
SciPy 1.2.0rc2 Pre-release
Pre-release

SciPy 1.2.0 Release Notes

Note: Scipy 1.2.0 is not released yet!

SciPy 1.2.0 is the culmination of 6 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. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with python -Wd and check for DeprecationWarning s).
Our development attention will now shift to bug-fix releases on the
1.2.x branch, and on adding new features on the master branch.

This release requires Python 2.7 or 3.4+ and NumPy 1.8.2 or greater.

.. note:: This will be the last SciPy release to support Python 2.7.
Consequently, the 1.2.x series will be a long term support (LTS)
release; we will backport bug fixes until 1 Jan 2020.

For running on PyPy, PyPy3 6.0+ and NumPy 1.15.0 are required.

Highlights of this release

  • 1-D root finding improvements with a new solver, toms748, and a new
    unified interface, root_scalar
  • New dual_annealing optimization method that combines stochastic and
    local deterministic searching
  • A new optimization algorithm, shgo (simplicial homology
    global optimization) for derivative free optimization problems
  • A new category of quaternion-based transformations are available in
    scipy.spatial.transform

New features

scipy.ndimage improvements

Proper spline coefficient calculations have been added for the mirror,
wrap, and reflect modes of scipy.ndimage.rotate

scipy.fftpack improvements

DCT-IV, DST-IV, DCT-I, and DST-I orthonormalization are now supported in
scipy.fftpack.

scipy.interpolate improvements

scipy.interpolate.pade now accepts a new argument for the order of the
numerator

scipy.cluster improvements

scipy.cluster.vq.kmeans2 gained a new initialization method, kmeans++.

scipy.special improvements

The function softmax was added to scipy.special.

scipy.optimize improvements

The one-dimensional nonlinear solvers have been given a unified interface
scipy.optimize.root_scalar, similar to the scipy.optimize.root interface
for multi-dimensional solvers. scipy.optimize.root_scalar(f, bracket=[a ,b], method="brenth") is equivalent to scipy.optimize.brenth(f, a ,b). If no
method is specified, an appropriate one will be selected based upon the
bracket and the number of derivatives available.

The so-called Algorithm 748 of Alefeld, Potra and Shi for root-finding within
an enclosing interval has been added as scipy.optimize.toms748. This provides
guaranteed convergence to a root with convergence rate per function evaluation
of approximately 1.65 (for sufficiently well-behaved functions.)

differential_evolution now has the updating and workers keywords.
The first chooses between continuous updating of the best solution vector (the
default), or once per generation. Continuous updating can lead to faster
convergence. The workers keyword accepts an int or map-like callable,
and parallelises the solver (having the side effect of updating once per
generation). Supplying an int evaluates the trial solutions in N parallel
parts. Supplying a map-like callable allows other parallelisation approaches
(such as mpi4py, or joblib) to be used.

dual_annealing (and shgo below) is a powerful new general purpose
global optizimation (GO) algorithm. dual_annealing uses two annealing
processes to accelerate the convergence towards the global minimum of an
objective mathematical function. The first annealing process controls the
stochastic Markov chain searching and the second annealing process controls the
deterministic minimization. So, dual annealing is a hybrid method that takes
advantage of stochastic and local deterministic searching in an efficient way.

shgo (simplicial homology global optimization) is a similar algorithm
appropriate for solving black box and derivative free optimization (DFO)
problems. The algorithm generally converges to the global solution in finite
time. The convergence holds for non-linear inequality and
equality constraints. In addition to returning a global minimum, the
algorithm also returns any other global and local minima found after every
iteration. This makes it useful for exploring the solutions in a domain.

scipy.optimize.newton can now accept a scalar or an array

MINPACK usage is now thread-safe, such that MINPACK + callbacks may
be used on multiple threads.

scipy.signal improvements

Digital filter design functions now include a parameter to specify the sampling
rate. Previously, digital filters could only be specified using normalized
frequency, but different functions used different scales (e.g. 0 to 1 for
butter vs 0 to π for freqz), leading to errors and confusion. With
the fs parameter, ordinary frequencies can now be entered directly into
functions, with the normalization handled internally.

find_peaks and related functions no longer raise an exception if the
properties of a peak have unexpected values (e.g. a prominence of 0). A
PeakPropertyWarning is given instead.

The new keyword argument plateau_size was added to find_peaks.
plateau_size may be used to select peaks based on the length of the
flat top of a peak.

welch() and csd() methods in scipy.signal now support calculation
of a median average PSD, using average='mean' keyword

scipy.sparse improvements

The scipy.sparse.bsr_matrix.tocsr method is now implemented directly instead
of converting via COO format, and the scipy.sparse.bsr_matrix.tocsc method
is now also routed via CSR conversion instead of COO. The efficiency of both
conversions is now improved.

The issue where SuperLU or UMFPACK solvers crashed on matrices with
non-canonical format in scipy.sparse.linalg was fixed. The solver wrapper
canonicalizes the matrix if necessary before calling the SuperLU or UMFPACK
solver.

The largest option of scipy.sparse.linalg.lobpcg() was fixed to have
a correct (and expected) behavior. The order of the eigenvalues was made
consistent with the ARPACK solver (eigs()), i.e. ascending for the
smallest eigenvalues, and descending for the largest eigenvalues.

The scipy.sparse.random function is now faster and also supports integer and
complex values by passing the appropriate value to the dtype argument.

scipy.spatial improvements

The function scipy.spatial.distance.jaccard was modified to return 0 instead
of np.nan when two all-zero vectors are compared.

Support for the Jensen Shannon distance, the square-root of the divergence, has
been added under scipy.spatial.distance.jensenshannon

An optional keyword was added to the function
scipy.spatial.cKDTree.query_ball_point() to sort or not sort the returned
indices. Not sorting the indices can speed up calls.

A new category of quaternion-based transformations are available in
scipy.spatial.transform, including spherical linear interpolation of
rotations (Slerp), conversions to and from quaternions, Euler angles,
and general rotation and inversion capabilities
(spatial.transform.Rotation), and uniform random sampling of 3D
rotations (spatial.transform.Rotation.random).

scipy.stats improvements

The Yeo-Johnson power transformation is now supported (yeojohnson,
yeojohnson_llf, yeojohnson_normmax, yeojohnson_normplot). Unlike
the Box-Cox transformation, the Yeo-Johnson transformation can accept negative
values.

Added a general method to sample random variates based on the density only, in
the new function rvs_ratio_uniforms.

The Yule-Simon distribution (yulesimon) was added -- this is a new
discrete probability distribution.

stats and mstats now have access to a new regression method,
siegelslopes, a robust linear regression algorithm

scipy.stats.gaussian_kde now has the ability to deal with weighted samples,
and should have a modest improvement in performance

Levy Stable Parameter Estimation, PDF, and CDF calculations are now supported
for scipy.stats.levy_stable.

The Brunner-Munzel test is now available as brunnermunzel in stats
and mstats

scipy.linalg improvements

scipy.linalg.lapack now exposes the LAPACK routines using the Rectangular
Full Packed storage (RFP) for upper triangular, lower triangular, symmetric,
or Hermitian matrices; the upper trapezoidal fat matrix RZ decomposition
routines are now available as well.

Deprecated features

The functions hyp2f0, hyp1f2 and hyp3f0 in scipy.special have
been deprecated.

Backwards incompatible changes

LAPACK version 3.4.0 or later is now required. Building with
Apple Accelerate is no longer supported.

The function scipy.linalg.subspace_angles(A, B) now gives correct
results for all angles. Before this, the function only returned
correct values for those angles which were greater than pi/4.

Support for the Bento build system has been removed. Bento has not been
maintained for several years, and...

Read more

SciPy 1.2.0rc1

26 Nov 17:59
v1.2.0rc1
3488be8
Compare
Choose a tag to compare
SciPy 1.2.0rc1 Pre-release
Pre-release

SciPy 1.2.0 Release Notes

Note: Scipy 1.2.0 is not released yet!

SciPy 1.2.0 is the culmination of 6 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. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with python -Wd and check for DeprecationWarning s).
Our development attention will now shift to bug-fix releases on the
1.2.x branch, and on adding new features on the master branch.

This release requires Python 2.7 or 3.4+ and NumPy 1.8.2 or greater.

Note: This will be the last SciPy release to support Python 2.7.
Consequently, the 1.2.x series will be a long term support (LTS)
release; we will backport bug fixes until 1 Jan 2020.

For running on PyPy, PyPy3 6.0+ and NumPy 1.15.0 are required.

Highlights of this release

  • 1-D root finding improvements with a new solver, toms748, and a new
    unified interface, root_scalar
  • New dual_annealing optimization method that combines stochastic and
    local deterministic searching
  • A new optimization algorithm, shgo (simplicial homology
    global optimization) for derivative free optimization problems
  • A new category of quaternion-based transformations are available in
    scipy.spatial.transform

New features

scipy.ndimage improvements

Proper spline coefficient calculations have been added for the mirror,
wrap, and reflect modes of scipy.ndimage.rotate

scipy.fftpack improvements

DCT-IV, DST-IV, DCT-I, and DST-I orthonormalization are now supported in
scipy.fftpack.

scipy.interpolate improvements

scipy.interpolate.pade now accepts a new argument for the order of the
numerator

scipy.cluster improvements

scipy.cluster.vq.kmeans2 gained a new initialization method, kmeans++.

scipy.special improvements

The function softmax was added to scipy.special.

scipy.optimize improvements

The one-dimensional nonlinear solvers have been given a unified interface
scipy.optimize.root_scalar, similar to the scipy.optimize.root interface
for multi-dimensional solvers. scipy.optimize.root_scalar(f, bracket=[a ,b], method="brenth") is equivalent to scipy.optimize.brenth(f, a ,b). If no
method is specified, an appropriate one will be selected based upon the
bracket and the number of derivatives available.

The so-called Algorithm 748 of Alefeld, Potra and Shi for root-finding within
an enclosing interval has been added as scipy.optimize.toms748. This provides
guaranteed convergence to a root with convergence rate per function evaluation
of approximately 1.65 (for sufficiently well-behaved functions.)

differential_evolution now has the updating and workers keywords.
The first chooses between continuous updating of the best solution vector (the
default), or once per generation. Continuous updating can lead to faster
convergence. The workers keyword accepts an int or map-like callable,
and parallelises the solver (having the side effect of updating once per
generation). Supplying an int evaluates the trial solutions in N parallel
parts. Supplying a map-like callable allows other parallelisation approaches
(such as mpi4py, or joblib) to be used.

dual_annealing (and shgo below) is a powerful new general purpose
global optizimation (GO) algorithm. dual_annealing uses two annealing
processes to accelerate the convergence towards the global minimum of an
objective mathematical function. The first annealing process controls the
stochastic Markov chain searching and the second annealing process controls the
deterministic minimization. So, dual annealing is a hybrid method that takes
advantage of stochastic and local deterministic searching in an efficient way.

shgo (simplicial homology global optimization) is a similar algorithm
appropriate for solving black box and derivative free optimization (DFO)
problems. The algorithm generally converges to the global solution in finite
time. The convergence holds for non-linear inequality and
equality constraints. In addition to returning a global minimum, the
algorithm also returns any other global and local minima found after every
iteration. This makes it useful for exploring the solutions in a domain.

scipy.optimize.newton can now accept a scalar or an array

MINPACK usage is now thread-safe, such that MINPACK + callbacks may
be used on multiple threads.

scipy.signal improvements

Digital filter design functions now include a parameter to specify the sampling
rate. Previously, digital filters could only be specified using normalized
frequency, but different functions used different scales (e.g. 0 to 1 for
butter vs 0 to π for freqz), leading to errors and confusion. With
the fs parameter, ordinary frequencies can now be entered directly into
functions, with the normalization handled internally.

find_peaks and related functions no longer raise an exception if the
properties of a peak have unexpected values (e.g. a prominence of 0). A
PeakPropertyWarning is given instead.

The new keyword argument plateau_size was added to find_peaks.
plateau_size may be used to select peaks based on the length of the
flat top of a peak.

welch() and csd() methods in scipy.signal now support calculation
of a median average PSD, using average='mean' keyword

scipy.sparse improvements

The scipy.sparse.bsr_matrix.tocsr method is now implemented directly instead
of converting via COO format, and the scipy.sparse.bsr_matrix.tocsc method
is now also routed via CSR conversion instead of COO. The efficiency of both
conversions is now improved.

The issue where SuperLU or UMFPACK solvers crashed on matrices with
non-canonical format in scipy.sparse.linalg was fixed. The solver wrapper
canonicalizes the matrix if necessary before calling the SuperLU or UMFPACK
solver.

The largest option of scipy.sparse.linalg.lobpcg() was fixed to have
a correct (and expected) behavior. The order of the eigenvalues was made
consistent with the ARPACK solver (eigs()), i.e. ascending for the
smallest eigenvalues, and descending for the largest eigenvalues.

The scipy.sparse.random function is now faster and also supports integer and
complex values by passing the appropriate value to the dtype argument.

scipy.spatial improvements

The function scipy.spatial.distance.jaccard was modified to return 0 instead
of np.nan when two all-zero vectors are compared.

Support for the Jensen Shannon distance, the square-root of the divergence, has
been added under scipy.spatial.distance.jensenshannon

An optional keyword was added to the function
scipy.spatial.cKDTree.query_ball_point() to sort or not sort the returned
indices. Not sorting the indices can speed up calls.

A new category of quaternion-based transformations are available in
scipy.spatial.transform, including spherical linear interpolation of
rotations (Slerp), conversions to and from quaternions, Euler angles,
and general rotation and inversion capabilities
(spatial.transform.Rotation), and uniform random sampling of 3D
rotations (spatial.transform.Rotation.random).

scipy.stats improvements

The Yeo-Johnson power transformation is now supported (yeojohnson,
yeojohnson_llf, yeojohnson_normmax, yeojohnson_normplot). Unlike
the Box-Cox transformation, the Yeo-Johnson transformation can accept negative
values.

Added a general method to sample random variates based on the density only, in
the new function rvs_ratio_uniforms.

The Yule-Simon distribution (yulesimon) was added -- this is a new
discrete probability distribution.

stats and mstats now have access to a new regression method,
siegelslopes, a robust linear regression algorithm

scipy.stats.gaussian_kde now has the ability to deal with weighted samples,
and should have a modest improvement in performance

Levy Stable Parameter Estimation, PDF, and CDF calculations are now supported
for scipy.stats.levy_stable.

The Brunner-Munzel test is now available as brunnermunzel in stats
and mstats

scipy.linalg improvements

scipy.linalg.lapack now exposes the LAPACK routines using the Rectangular
Full Packed storage (RFP) for upper triangular, lower triangular, symmetric,
or Hermitian matrices; the upper trapezoidal fat matrix RZ decomposition
routines are now available as well.

Deprecated features

The functions hyp2f0, hyp1f2 and hyp3f0 in scipy.special have
been deprecated.

Backwards incompatible changes

LAPACK version 3.4.0 or later is now required. Building with
Apple Accelerate is no longer supported.

The function scipy.linalg.subspace_angles(A, B) now gives correct
results for all angles. Before this, the function only returned
correct values for those angles which were greater than pi/4.

Support for the Bento build system has been removed. Bento has not been
maintained for several years, and did not have good P...

Read more

SciPy 1.1.0

05 May 18:21
@pv pv
v1.1.0
Compare
Choose a tag to compare

SciPy 1.1.0 is the culmination of 7 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. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so,
run your code with python -Wd and check for DeprecationWarning s).
Our development attention will now shift to bug-fix releases on the
1.1.x branch, and on adding new features on the master branch.

This release requires Python 2.7 or 3.4+ and NumPy 1.8.2 or greater.

This release has improved but not necessarily 100% compatibility with
the PyPy Python implementation. For running on
PyPy, PyPy 6.0+ and Numpy 1.15.0+ are required.

New features

scipy.integrate improvements

The argument tfirst has been added to the function
scipy.integrate.odeint. This allows odeint to use the same user
functions as scipy.integrate.solve_ivp and scipy.integrate.ode without
the need for wrapping them in a function that swaps the first two
arguments.

Error messages from quad() are now clearer.

scipy.linalg improvements

The function scipy.linalg.ldl has been added for factorization of
indefinite symmetric/hermitian matrices into triangular and block
diagonal matrices.

Python wrappers for LAPACK sygst, hegst added in
scipy.linalg.lapack.

Added scipy.linalg.null_space, scipy.linalg.cdf2rdf,
scipy.linalg.rsf2csf.

scipy.misc improvements

An electrocardiogram has been added as an example dataset for a
one-dimensional signal. It can be accessed through
scipy.misc.electrocardiogram.

scipy.ndimage improvements

The routines scipy.ndimage.binary_opening, and
scipy.ndimage.binary_closing now support masks and different border
values.

scipy.optimize improvements

The method trust-constr has been added to scipy.optimize.minimize. The
method switches between two implementations depending on the problem
definition. For equality constrained problems it is an implementation of
a trust-region sequential quadratic programming solver and, when
inequality constraints are imposed, it switches to a trust-region
interior point method. Both methods are appropriate for large scale
problems. Quasi-Newton options BFGS and SR1 were implemented and can be
used to approximate second order derivatives for this new method. Also,
finite-differences can be used to approximate either first-order or
second-order derivatives.

Random-to-Best/1/bin and Random-to-Best/1/exp mutation strategies were
added to scipy.optimize.differential_evolution as randtobest1bin and
randtobest1exp, respectively. Note: These names were already in use
but implemented a different mutation strategy. See Backwards
incompatible changes
, below. The
init keyword for the scipy.optimize.differential_evolution function
can now accept an array. This array allows the user to specify the
entire population.

Add an adaptive option to Nelder-Mead to use step parameters adapted
to the dimensionality of the problem.

Minor improvements in scipy.optimize.basinhopping.

scipy.signal improvements

Three new functions for peak finding in one-dimensional arrays were
added. scipy.signal.find_peaks searches for peaks (local maxima) based
on simple value comparison of neighbouring samples and returns those
peaks whose properties match optionally specified conditions for their
height, prominence, width, threshold and distance to each other.
scipy.signal.peak_prominences and scipy.signal.peak_widths can
directly calculate the prominences or widths of known peaks.

Added ZPK versions of frequency transformations:
scipy.signal.bilinear_zpk, scipy.signal.lp2bp_zpk,
scipy.signal.lp2bs_zpk, scipy.signal.lp2hp_zpk,
scipy.signal.lp2lp_zpk.

Added scipy.signal.windows.dpss, scipy.signal.windows.general_cosine
and scipy.signal.windows.general_hamming.

scipy.sparse improvements

Previously, the reshape method only worked on
scipy.sparse.lil_matrix, and in-place reshaping did not work on any
matrices. Both operations are now implemented for all matrices. Handling
of shapes has been made consistent with numpy.matrix throughout the
scipy.sparse module (shape can be a tuple or splatted, negative number
acts as placeholder, padding and unpadding dimensions of size 1 to
ensure length-2 shape).

scipy.special improvements

Added Owen's T function as scipy.special.owens_t.

Accuracy improvements in chndtr, digamma, gammaincinv, lambertw,
zetac.

scipy.stats improvements

The Moyal distribution has been added as scipy.stats.moyal.

Added the normal inverse Gaussian distribution as
scipy.stats.norminvgauss.

Deprecated features

The iterative linear equation solvers in scipy.sparse.linalg had a
sub-optimal way of how absolute tolerance is considered. The default
behavior will be changed in a future Scipy release to a more standard
and less surprising one. To silence deprecation warnings, set the
atol= parameter explicitly.

scipy.signal.windows.slepian is deprecated, replaced by
scipy.signal.windows.dpss.

The window functions in scipy.signal are now available in
scipy.signal.windows. They will remain also available in the old
location in the scipy.signal namespace in future Scipy versions.
However, importing them from scipy.signal.windows is preferred, and new
window functions will be added only there.

Indexing sparse matrices with floating-point numbers instead of integers
is deprecated.

The function scipy.stats.itemfreq is deprecated.

Backwards incompatible changes

Previously, scipy.linalg.orth used a singular value cutoff value
appropriate for double precision numbers also for single-precision
input. The cutoff value is now tunable, and the default has been changed
to depend on the input data precision.

In previous versions of Scipy, the randtobest1bin and randtobest1exp
mutation strategies in scipy.optimize.differential_evolution were
actually implemented using the Current-to-Best/1/bin and
Current-to-Best/1/exp strategies, respectively. These strategies were
renamed to currenttobest1bin and currenttobest1exp and the
implementations of randtobest1bin and randtobest1exp strategies were
corrected.

Functions in the ndimage module now always return their output array.
Before this most functions only returned the output array if it had been
allocated by the function, and would return None if it had been
provided by the user.

Distance metrics in scipy.spatial.distance now require non-negative
weights.

scipy.special.loggamma returns now real-valued result when the input is
real-valued.

Other changes

When building on Linux with GNU compilers, the .so Python extension
files now hide all symbols except those required by Python, which can
avoid problems when embedding the Python interpreter.

Authors

  • Saurabh Agarwal +
  • Diogo Aguiam +
  • Joseph Albert +
  • Gerrit Ansmann +
  • Jean-François B +
  • Vahan Babayan +
  • Alessandro Pietro Bardelli
  • Christoph Baumgarten +
  • Felix Berkenkamp
  • Lilian Besson +
  • Aditya Bharti +
  • Matthew Brett
  • Evgeni Burovski
  • CJ Carey
  • Martin Ø. Christensen +
  • Robert Cimrman
  • Vicky Close +
  • Peter Cock +
  • Philip DeBoer
  • Jaime Fernandez del Rio
  • Dieter Werthmüller +
  • Tom Donoghue +
  • Matt Dzugan +
  • Lars G +
  • Jacques Gaudin +
  • Andriy Gelman +
  • Sean Gillies +
  • Dezmond Goff
  • Christoph Gohlke
  • Ralf Gommers
  • Uri Goren +
  • Deepak Kumar Gouda +
  • Douglas Lessa Graciosa +
  • Matt Haberland
  • David Hagen
  • Charles Harris
  • Jordan Heemskerk +
  • Danny Hermes +
  • Stephan Hoyer +
  • Theodore Hu +
  • Jean-François B. +
  • Mads Jensen +
  • Jon Haitz Legarreta Gorroño +
  • Ben Jude +
  • Noel Kippers +
  • Julius Bier Kirkegaard +
  • Maria Knorps +
  • Mikkel Kristensen +
  • Eric Larson
  • Kasper Primdal Lauritzen +
  • Denis Laxalde
  • KangWon Lee +
  • Jan Lehky +
  • Jackie Leng +
  • P.L. Lim +
  • Nikolay Mayorov
  • Mihai Capotă +
  • Max Mikhaylov +
  • Mark Mikofski +
  • Jarrod Millman
  • Raden Muhammad +
  • Paul Nation
  • Andrew Nelson
  • Nico Schlömer
  • Joel Nothman
  • Kyle Oman +
  • Egor Panfilov +
  • Nick Papior
  • Anubhav Patel +
  • Oleksandr Pavlyk
  • Ilhan Polat
  • Robert Pollak +
  • Anant Prakash +
  • Aman Pratik
  • Sean Quinn +
  • Giftlin Rajaiah +
  • Tyler Reddy
  • Joscha Reimer
  • Antonio H Ribeiro +
  • Antonio Horta Ribeiro
  • Benjamin Rose +
  • Fabian Rost
  • Divakar Roy +
  • Scott Sievert
  • Leo Singer
  • Sourav Singh
  • Martino Sorbaro +
  • Eric Stansifer +
  • Martin Thoma
  • Phil Tooley +
  • Piotr Uchwat +
  • Paul van Mulbregt
  • Pauli Virtanen
  • Stefan van der Walt
  • Warren Weckesser
  • Florian Weimer +
  • Eric Wieser
  • Josh Wilson
  • Ted Ying +
  • Evgeny Zhurko
  • Zé Vinícius
  • @Astrofysicus +
  • @awakenting +
  • @endolith
  • @FormerPhysicist +
  • @gaulinmp +
  • @hugovk
  • @ksemb +
  • @kshitij12345 +
  • @luzpaz +
  • @NKrvavica +
  • @rafalalgo +
  • @samyak0210 +
  • @soluwalana +
  • @sudheerachary +
  • @Tokixix +
  • @tttthomasssss +
  • @vkk800 +
  • @xoviat
  • @ziejcow +

A total of 122 people contributed to this release. People with a "+"
by their names contributed a patch for the first time. This list of
names is automatically generated, and may not be fully complete.

Scipy 1.1.0rc1

15 Apr 18:23
@pv pv
v1.1.0rc1
Compare
Choose a tag to compare
Scipy 1.1.0rc1 Pre-release
Pre-release

SciPy 1.1.0 Release Notes

Note: Scipy 1.1.0 is not released yet!

SciPy 1.1.0 is the culmination of 7 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. Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code with python -Wd and check for DeprecationWarning s). Our development attention will now shift to bug-fix releases on the 1.1.x branch, and on adding new features on the master branch.

This release requires Python 2.7 or 3.4+ and NumPy 1.8.2 or greater.

This release has improved but not necessarily 100% compatibility with the PyPy Python implementation. For running on PyPy, PyPy 6.0+ and Numpy 1.15.0+ are required.

New features

scipy.integrate improvements

The argument tfirst has been added to the function scipy.integrate.odeint. This allows odeint to use the same user functions as scipy.integrate.solve_ivp and scipy.integrate.ode without the need for wrapping them in a function that swaps the first two arguments.

Error messages from quad() are now clearer.

scipy.linalg improvements

The function scipy.linalg.ldl has been added for factorization of indefinite symmetric/hermitian matrices into triangular and block diagonal matrices.

Python wrappers for LAPACK sygst, hegst added in scipy.linalg.lapack.

Added scipy.linalg.null_space, scipy.linalg.cdf2rdf, scipy.linalg.rsf2csf.

scipy.misc improvements

An electrocardiogram has been added as an example dataset for a one-dimensional signal. It can be accessed through scipy.misc.electrocardiogram.

scipy.ndimage improvements

The routines scipy.ndimage.binary_opening, and scipy.ndimage.binary_closing now support masks and different border values.

scipy.optimize improvements

The method trust-constr has been added to scipy.optimize.minimize. The method switches between two implementations depending on the problem definition. For equality constrained problems it is an implementation of a trust-region sequential quadratic programming solver and, when inequality constraints are imposed, it switches to a trust-region interior point method. Both methods are appropriate for large scale
problems. Quasi-Newton options BFGS and SR1 were implemented and can be used to approximate second order derivatives for this new method. Also, finite-differences can be used to approximate either first-order or
second-order derivatives.

Random-to-Best/1/bin and Random-to-Best/1/exp mutation strategies were added to scipy.optimize.differential_evolution as randtobest1bin and randtobest1exp, respectively. Note: These names were already in use but implemented a different mutation strategy. See Backwards incompatible changes, below. The init keyword for the scipy.optimize.differential_evolution function can now accept an array. This array allows the user to specify the
entire population.

Add an adaptive option to Nelder-Mead to use step parameters adapted to the dimensionality of the problem.

Minor improvements in scipy.optimize.basinhopping.

scipy.signal improvements

Three new functions for peak finding in one-dimensional arrays were added. scipy.signal.find_peaks searches for peaks (local maxima) based on simple value comparison of neighbouring samples and returns those
peaks whose properties match optionally specified conditions for their height, prominence, width, threshold and distance to each other. scipy.signal.peak_prominences and scipy.signal.peak_widths can directly calculate the prominences or widths of known peaks.

Added ZPK versions of frequency transformations: scipy.signal.bilinear_zpk, scipy.signal.lp2bp_zpk, scipy.signal.lp2bs_zpk, scipy.signal.lp2hp_zpk, scipy.signal.lp2lp_zpk.

Added scipy.signal.windows.dpss, scipy.signal.windows.general_cosine and scipy.signal.windows.general_hamming.

scipy.sparse improvements

An in-place resize method has been added to all sparse matrix formats, which was only available for scipy.sparse.dok_matrix in previous releases.

scipy.special improvements

Added Owen's T function as scipy.special.owens_t.

Accuracy improvements in chndtr, digamma, gammaincinv, lambertw, zetac.

scipy.stats improvements

The Moyal distribution has been added as scipy.stats.moyal.

Added the normal inverse Gaussian distribution as scipy.stats.norminvgauss.

Deprecated features

The iterative linear equation solvers in scipy.sparse.linalg had a sub-optimal way of how absolute tolerance is considered. The default behavior will be changed in a future Scipy release to a more standard and less surprising one. To silence deprecation warnings, set the atol= parameter explicitly.

scipy.signal.windows.slepian is deprecated, replaced by scipy.signal.windows.dpss.

The window functions in scipy.signal are now available in scipy.signal.windows. They will remain also available in the old location in the scipy.signal namespace in future Scipy versions. However, importing them from scipy.signal.windows is preferred, and new window functions will be added only there.

Indexing sparse matrices with floating-point numbers instead of integers is deprecated.

The function scipy.stats.itemfreq is deprecated.

Backwards incompatible changes

Previously, scipy.linalg.orth used a singular value cutoff value appropriate for double precision numbers also for single-precision input. The cutoff value is now tunable, and the default has been changed to depend on the input data precision.

In previous versions of Scipy, the randtobest1bin and randtobest1exp mutation strategies in scipy.optimize.differential_evolution were actually implemented using the Current-to-Best/1/bin and Current-to-Best/1/exp strategies, respectively. These strategies were renamed to currenttobest1bin and currenttobest1exp and the implementations of randtobest1bin and randtobest1exp strategies were corrected.

Functions in the ndimage module now always return their output array. Before this most functions only returned the output array if it had been allocated by the function, and would return None if it had been provided by the user.

Distance metrics in scipy.spatial.distance now require non-negative weights.

scipy.special.loggamma returns now real-valued result when the input is real-valued.

Other changes

When building on Linux with GNU compilers, the .so Python extension files now hide all symbols except those required by Python, which can avoid problems when embedding the Python interpreter.

Authors

  • Saurabh Agarwal +
  • Diogo Aguiam +
  • Joseph Albert +
  • Gerrit Ansmann +
  • Astrofysicus +
  • Jean-François B +
  • Vahan Babayan +
  • Alessandro Pietro Bardelli
  • Christoph Baumgarten +
  • Felix Berkenkamp
  • Lilian Besson +
  • Aditya Bharti +
  • Matthew Brett
  • Evgeni Burovski
  • CJ Carey
  • Martin Ø. Christensen +
  • Robert Cimrman
  • Vicky Close +
  • Peter Cock +
  • Philip DeBoer
  • Jaime Fernandez del Rio
  • Dieter Werthmüller +
  • Tom Donoghue +
  • Matt Dzugan +
  • Lars G +
  • Jacques Gaudin +
  • Andriy Gelman +
  • Sean Gillies +
  • Dezmond Goff
  • Christoph Gohlke
  • Ralf Gommers
  • Uri Goren +
  • Deepak Kumar Gouda +
  • Douglas Lessa Graciosa +
  • Matt Haberland
  • David Hagen
  • Charles Harris
  • Jordan Heemskerk +
  • Danny Hermes +
  • Stephan Hoyer +
  • Theodore Hu +
  • Jean-François B. +
  • Mads Jensen +
  • Jon Haitz Legarreta Gorroño +
  • Ben Jude +
  • Noel Kippers +
  • Julius Bier Kirkegaard +
  • Maria Knorps +
  • Mikkel Kristensen +
  • Eric Larson
  • Kasper Primdal Lauritzen +
  • Denis Laxalde
  • KangWon Lee +
  • Jan Lehky +
  • Jackie Leng +
  • P.L. Lim +
  • Nikolay Mayorov
  • Mihai Capotă +
  • Max Mikhaylov +
  • Mark Mikofski +
  • Jarrod Millman
  • Raden Muhammad +
  • Paul Nation
  • Andrew Nelson
  • Nico Schlömer
  • Joel Nothman
  • Kyle Oman +
  • Egor Panfilov +
  • Nick Papior
  • Anubhav Patel +
  • Oleksandr Pavlyk
  • Ilhan Polat
  • Robert Pollak +
  • Anant Prakash +
  • Aman Pratik
  • Sean Quinn +
  • Giftlin Rajaiah +
  • Tyler Reddy
  • Joscha Reimer
  • Antonio H Ribeiro +
  • Antonio Horta Ribeiro
  • Benjamin Rose +
  • Fabian Rost
  • Divakar Roy +
  • Scott Sievert
  • Leo Singer
  • Sourav Singh
  • Martino Sorbaro +
  • Eric Stansifer +
  • Martin Thoma
  • Phil Tooley +
  • Piotr Uchwat +
  • Paul van Mulbregt
  • Pauli Virtanen
  • Stefan van der Walt
  • Warren Weckesser
  • Florian Weimer +
  • Eric Wieser
  • Josh Wilson
  • Ted Ying +
  • Evgeny Zhurko
  • Zé Vinícius
  • @awakenting +
  • @endolith
  • @FormerPhysicist +
  • @gaulinmp +
  • @hugovk
  • @ksemb +
  • @kshitij12345 +
  • @luzpaz +
  • @NKrvavica +
  • @rafalalgo +
  • @samyak0210 +
  • @soluwalana +
  • @sudheerachary +
  • @Tokixix +
  • @tttthomasssss +
  • @vkk800 +
  • @xoviat
  • @ziejcow +

A total of 122 people contributed to this release. People with a "+"
by their names contributed a patch for the first time. This list of
names is automatically generated, and may not be fully complete.

SciPy 1.0.1

24 Mar 19:42
Compare
Choose a tag to compare

SciPy 1.0.1 is a bug-fix release with no new features compared to 1.0.0.
Probably the most important change is a fix for an incompatibility between
SciPy 1.0.0 and numpy.f2py in the NumPy master branch.

SciPy 1.0.0

25 Oct 10:11
Compare
Choose a tag to compare

We are extremely pleased to announce the release of SciPy 1.0, 16 years after
version 0.1 saw the light of day. It has been a long, productive journey to
get here, and we anticipate many more exciting new features and releases in the
future.

Why 1.0 now?

A version number should reflect the maturity of a project - and SciPy was a
mature and stable library that is heavily used in production settings for a
long time already. From that perspective, the 1.0 version number is long
overdue.

Some key project goals, both technical (e.g. Windows wheels and continuous
integration) and organisational (a governance structure, code of conduct and a
roadmap), have been achieved recently.

Many of us are a bit perfectionist, and therefore are reluctant to call
something "1.0" because it may imply that it's "finished" or "we are 100% happy
with it". This is normal for many open source projects, however that doesn't
make it right. We acknowledge to ourselves that it's not perfect, and there
are some dusty corners left (that will probably always be the case). Despite
that, SciPy is extremely useful to its users, on average has high quality code
and documentation, and gives the stability and backwards compatibility
guarantees that a 1.0 label imply.

Some history and perspectives

  • 2001: the first SciPy release
  • 2005: transition to NumPy
  • 2007: creation of scikits
  • 2008: scipy.spatial module and first Cython code added
  • 2010: moving to a 6-monthly release cycle
  • 2011: SciPy development moves to GitHub
  • 2011: Python 3 support
  • 2012: adding a sparse graph module and unified optimization interface
  • 2012: removal of scipy.maxentropy
  • 2013: continuous integration with TravisCI
  • 2015: adding Cython interface for BLAS/LAPACK and a benchmark suite
  • 2017: adding a unified C API with scipy.LowLevelCallable; removal of scipy.weave
  • 2017: SciPy 1.0 release

Pauli Virtanen is SciPy's Benevolent Dictator For Life (BDFL). He says:

Truthfully speaking, we could have released a SciPy 1.0 a long time ago, so I'm
happy we do it now at long last. The project has a long history, and during the
years it has matured also as a software project. I believe it has well proved
its merit to warrant a version number starting with unity.

Since its conception 15+ years ago, SciPy has largely been written by and for
scientists, to provide a box of basic tools that they need. Over time, the set
of people active in its development has undergone some rotation, and we have
evolved towards a somewhat more systematic approach to development. Regardless,
this underlying drive has stayed the same, and I think it will also continue
propelling the project forward in future. This is all good, since not long
after 1.0 comes 1.1.

Travis Oliphant is one of SciPy's creators. He says:

I'm honored to write a note of congratulations to the SciPy developers and the
entire SciPy community for the release of SciPy 1.0. This release represents
a dream of many that has been patiently pursued by a stalwart group of pioneers
for nearly 2 decades. Efforts have been broad and consistent over that time
from many hundreds of people. From initial discussions to efforts coding and
packaging to documentation efforts to extensive conference and community
building, the SciPy effort has been a global phenomenon that it has been a
privilege to participate in.

The idea of SciPy was already in multiple people’s minds in 1997 when I first
joined the Python community as a young graduate student who had just fallen in
love with the expressibility and extensibility of Python. The internet was
just starting to bringing together like-minded mathematicians and scientists in
nascent electronically-connected communities. In 1998, there was a concerted
discussion on the matrix-SIG, python mailing list with people like Paul
Barrett, Joe Harrington, Perry Greenfield, Paul Dubois, Konrad Hinsen, David
Ascher, and others. This discussion encouraged me in 1998 and 1999 to
procrastinate my PhD and spend a lot of time writing extension modules to
Python that mostly wrapped battle-tested Fortran and C-code making it available
to the Python user. This work attracted the help of others like Robert Kern,
Pearu Peterson and Eric Jones who joined their efforts with mine in 2000 so
that by 2001, the first SciPy release was ready. This was long before Github
simplified collaboration and input from others and the "patch" command and
email was how you helped a project improve.

Since that time, hundreds of people have spent an enormous amount of time
improving the SciPy library and the community surrounding this library has
dramatically grown. I stopped being able to participate actively in developing
the SciPy library around 2010. Fortunately, at that time, Pauli Virtanen and
Ralf Gommers picked up the pace of development supported by dozens of other key
contributors such as David Cournapeau, Evgeni Burovski, Josef Perktold, and
Warren Weckesser. While I have only been able to admire the development of
SciPy from a distance for the past 7 years, I have never lost my love of the
project and the concept of community-driven development. I remain driven
even now by a desire to help sustain the development of not only the SciPy
library but many other affiliated and related open-source projects. I am
extremely pleased that SciPy is in the hands of a world-wide community of
talented developers who will ensure that SciPy remains an example of how
grass-roots, community-driven development can succeed.

Fernando Perez offers a wider community perspective:

The existence of a nascent Scipy library, and the incredible --if tiny by
today's standards-- community surrounding it is what drew me into the
scientific Python world while still a physics graduate student in 2001. Today,
I am awed when I see these tools power everything from high school education to
the research that led to the 2017 Nobel Prize in physics.

Don't be fooled by the 1.0 number: this project is a mature cornerstone of the
modern scientific computing ecosystem. I am grateful for the many who have
made it possible, and hope to be able to contribute again to it in the future.
My sincere congratulations to the whole team!

Highlights of this release

Some of the highlights of this release are:

  • Major build improvements. Windows wheels are available on PyPI for the
    first time, and continuous integration has been set up on Windows and OS X
    in addition to Linux.
  • A set of new ODE solvers and a unified interface to them
    (scipy.integrate.solve_ivp).
  • Two new trust region optimizers and a new linear programming method, with
    improved performance compared to what scipy.optimize offered previously.
  • Many new BLAS and LAPACK functions were wrapped. The BLAS wrappers are now
    complete.

Upgrading and compatibility

There have been a number of deprecations and API changes in this release, which
are documented below. Before upgrading, we recommend that users check that
their own code does not use deprecated SciPy functionality (to do so, run your
code with python -Wd and check for DeprecationWarning s).

This release requires Python 2.7 or >=3.4 and NumPy 1.8.2 or greater.

This is also the last release to support LAPACK 3.1.x - 3.3.x. Moving the
lowest supported LAPACK version to >3.2.x was long blocked by Apple Accelerate
providing the LAPACK 3.2.1 API. We have decided that it's time to either drop
Accelerate or, if there is enough interest, provide shims for functions added
in more recent LAPACK versions so it can still be used.

New features

scipy.cluster improvements

scipy.cluster.hierarchy.optimal_leaf_ordering, a function to reorder a
linkage matrix to minimize distances between adjacent leaves, was added.

scipy.fftpack improvements

N-dimensional versions of the discrete sine and cosine transforms and their
inverses were added as dctn, idctn, dstn and idstn.

scipy.integrate improvements

A set of new ODE solvers have been added to scipy.integrate. The convenience
function scipy.integrate.solve_ivp allows uniform access to all solvers.
The individual solvers (RK23, RK45, Radau, BDF and LSODA)
can also be used directly.

scipy.linalg improvements

The BLAS wrappers in scipy.linalg.blas have been completed. Added functions
are *gbmv, *hbmv, *hpmv, *hpr, *hpr2, *spmv, *spr,
*tbmv, *tbsv, *tpmv, *tpsv, *trsm, *trsv, *sbmv,
*spr2,

Wrappers for the LAPACK functions *gels, *stev, *sytrd, *hetrd,
*sytf2, *hetrf, *sytrf, *sycon, *hecon, *gglse,
*stebz, *stemr, *sterf, and *stein have been added.

The function scipy.linalg.subspace_angles has been added to compute the
subspace angles between two matrices.

The function scipy.linalg.clarkson_woodruff_transform has been added.
It finds low-rank matrix approximation via the Clarkson-Woodruff Transform.

The functions scipy.linalg.eigh_tridiagonal and
scipy.linalg.eigvalsh_tridiagonal, which find the eigenvalues and
eigenvectors of tridiagonal hermitian/symmetric matrices, were added.

scipy.ndimage improvements

Support for homogeneous coordinate transforms has been added to
scipy.ndimage.affine_transform.

The ndimage C code underwent a significant refactoring, and is now
a lot easier to understand and maintain.

scipy.optimize improvements
---------------------------...

Read more