Skip to content

Releases: scipy/scipy

SciPy 1.6.0rc1

11 Dec 01:43
v1.6.0rc1
Compare
Choose a tag to compare
SciPy 1.6.0rc1 Pre-release
Pre-release

SciPy 1.6.0 Release Notes

Note: Scipy 1.6.0 is not released yet!

SciPy 1.6.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.6.x branch, and on adding new features on the master branch.

This release requires Python 3.7+ and NumPy 1.16.5 or greater.

For running on PyPy, PyPy3 6.0+ is required.

Highlights of this release

  • scipy.ndimage improvements: Fixes and ehancements to boundary extension
    modes for interpolation functions. Support for complex-valued inputs in many
    filtering and interpolation functions. New grid_mode option for
    scipy.ndimage.zoom to enable results consistent with scikit-image's
    rescale.
  • scipy.optimize.linprog has fast, new methods for large, sparse problems
    from the HiGHS library.
  • scipy.stats improvements including new distributions, a new test, and
    enhancements to existing distributions and tests

New features

scipy.special improvements

scipy.special now has improved support for 64-bit LAPACK backend

scipy.odr improvements

scipy.odr now has support for 64-bit integer BLAS

scipy.odr.ODR has gained an optional overwrite argument so that existing
files may be overwritten.

scipy.integrate improvements

Some renames of functions with poor names were done, with the old names
retained without being in the reference guide for backwards compatibility
reasons:

  • integrate.simps was renamed to integrate.simpson
  • integrate.trapz was renamed to integrate.trapezoid
  • integrate.cumtrapz was renamed to integrate.cumulative_trapezoid

scipy.cluster improvements

scipy.cluster.hierarchy.DisjointSet has been added for incremental
connectivity queries.

scipy.cluster.hierarchy.dendrogram return value now also includes leaf color
information in leaves_color_list.

scipy.interpolate improvements

scipy.interpolate.interp1d has a new method nearest-up, similar to the
existing method nearest but rounds half-integers up instead of down.

scipy.io improvements

Support has been added for reading arbitrary bit depth integer PCM WAV files
from 1- to 32-bit, including the commonly-requested 24-bit depth.

scipy.linalg improvements

The new function scipy.linalg.matmul_toeplitz uses the FFT to compute the
product of a Toeplitz matrix with another matrix.

scipy.linalg.sqrtm and scipy.linalg.logm have performance improvements
thanks to additional Cython code.

Python LAPACK wrappers have been added for pptrf, pptrs, ppsv,
pptri, and ppcon.

scipy.linalg.norm and the svd family of functions will now use 64-bit
integer backends when available.

scipy.ndimage improvements

scipy.ndimage.convolve, scipy.ndimage.correlate and their 1d counterparts
now accept both complex-valued images and/or complex-valued filter kernels. All
convolution-based filters also now accept complex-valued inputs
(e.g. gaussian_filter, uniform_filter, etc.).

Multiple fixes and enhancements to boundary handling were introduced to
scipy.ndimage interpolation functions (i.e. affine_transform,
geometric_transform, map_coordinates, rotate, shift, zoom).

A new boundary mode, grid-wrap was added which wraps images periodically,
using a period equal to the shape of the input image grid. This is in contrast
to the existing wrap mode which uses a period that is one sample smaller
than the original signal extent along each dimension.

A long-standing bug in the reflect boundary condition has been fixed and
the mode grid-mirror was introduced as a synonym for reflect.

A new boundary mode, grid-constant is now available. This is similar to
the existing ndimage constant mode, but interpolation will still performed
at coordinate values outside of the original image extent. This
grid-constant mode is consistent with OpenCV's BORDER_CONSTANT mode
and scikit-image's constant mode.

Spline pre-filtering (used internally by ndimage interpolation functions
when order >= 2), now supports all boundary modes rather than always
defaulting to mirror boundary conditions. The standalone functions
spline_filter and spline_filter1d have analytical boundary conditions
that match modes mirror, grid-wrap and reflect.

scipy.ndimage interpolation functions now accept complex-valued inputs. In
this case, the interpolation is applied independently to the real and
imaginary components.

The ndimage tutorials
(https://docs.scipy.org/doc/scipy/reference/tutorial/ndimage.html) have been
updated with new figures to better clarify the exact behavior of all of the
interpolation boundary modes.

scipy.ndimage.zoom now has a grid_mode option that changes the coordinate
of the center of the first pixel along an axis from 0 to 0.5. This allows
resizing in a manner that is consistent with the behavior of scikit-image's
resize and rescale functions (and OpenCV's cv2.resize).

scipy.optimize improvements

scipy.optimize.linprog has fast, new methods for large, sparse problems from
the HiGHS C++ library. method='highs-ds' uses a high performance dual
revised simplex implementation (HSOL), method='highs-ipm' uses an
interior-point method with crossover, and method='highs' chooses between
the two automatically. These methods are typically much faster and often exceed
the accuracy of other linprog methods, so we recommend explicitly
specifying one of these three method values when using linprog.

scipy.optimize.quadratic_assignment has been added for approximate solution
of the quadratic assignment problem.

scipy.optimize.linear_sum_assignment now has a substantially reduced overhead
for small cost matrix sizes

scipy.optimize.least_squares has improved performance when the user provides
the jacobian as a sparse jacobian already in csr_matrix format

scipy.optimize.linprog now has an rr_method argument for specification
of the method used for redundancy handling, and a new method for this purpose
is available based on the interpolative decomposition approach.

scipy.signal improvements

scipy.signal.gammatone has been added to design FIR or IIR filters that
model the human auditory system.

scipy.signal.iircomb has been added to design IIR peaking/notching comb
filters that can boost/attenuate a frequency from a signal.

scipy.signal.sosfilt performance has been improved to avoid some previously-
observed slowdowns

scipy.signal.windows.taylor has been added--the Taylor window function is
commonly used in radar digital signal processing

scipy.signal.gauss_spline now supports list type input for consistency
with other related SciPy functions

scipy.signal.correlation_lags has been added to allow calculation of the lag/
displacement indices array for 1D cross-correlation.

scipy.sparse improvements

A solver for the minimum weight full matching problem for bipartite graphs,
also known as the linear assignment problem, has been added in
scipy.sparse.csgraph.min_weight_full_bipartite_matching. In particular, this
provides functionality analogous to that of
scipy.optimize.linear_sum_assignment, but with improved performance for sparse
inputs, and the ability to handle inputs whose dense representations would not
fit in memory.

The time complexity of scipy.sparse.block_diag has been improved dramatically
from quadratic to linear.

scipy.sparse.linalg improvements

The vendored version of SuperLU has been updated

scipy.fft improvements

The vendored pocketfft library now supports compiling with ARM neon vector
extensions and has improved thread pool behavior.

scipy.spatial improvements

The python implementation of KDTree has been dropped and KDTree is now
implemented in terms of cKDTree. You can now expect cKDTree-like
performance by default. This also means sys.setrecursionlimit no longer
needs to be increased for querying large trees.

transform.Rotation has been updated with support for Modified Rodrigues
Parameters alongside the existing rotation representations (PR gh-12667).

scipy.spatial.transform.Rotation has been partially cythonized, with some
performance improvements observed

scipy.spatial.distance.cdist has improved performance with the minkowski
metric, especially for p-norm values of 1 or 2.

scipy.stats improvements

New distributions have been added to scipy.stats:

  • The asymmetric Laplace continuous distribution has been added as
    scipy.stats.laplace_asymmetric.
  • The negative hypergeometric distribution has been added as `scipy...
Read more

SciPy 1.5.4

05 Nov 03:09
v1.5.4
Compare
Choose a tag to compare

SciPy 1.5.4 Release Notes

SciPy 1.5.4 is a bug-fix release with no new features
compared to 1.5.3. Importantly, wheels are now available
for Python 3.9 and a more complete fix has been applied for
issues building with XCode 12.

Authors

  • Peter Bell
  • CJ Carey
  • Andrew McCluskey +
  • Andrew Nelson
  • Tyler Reddy
  • Eli Rykoff +
  • Ian Thomas +

A total of 7 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.5.3

17 Oct 22:11
v1.5.3
Compare
Choose a tag to compare

SciPy 1.5.3 Release Notes

SciPy 1.5.3 is a bug-fix release with no new features
compared to 1.5.2. In particular, Linux ARM64 wheels are now
available and a compatibility issue with XCode 12 has
been fixed.

Authors

  • Peter Bell
  • CJ Carey
  • Thomas Duvernay +
  • Gregory Lee
  • Eric Moore
  • odidev
  • Dima Pasechnik
  • Tyler Reddy
  • Simon Segerblom Rex +
  • Daniel B. Smith
  • Will Tirone +
  • Warren Weckesser

A total of 12 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.5.2

24 Jul 02:15
v1.5.2
01d8bfb
Compare
Choose a tag to compare

SciPy 1.5.2 Release Notes

SciPy 1.5.2 is a bug-fix release with no new features
compared to 1.5.1.

Authors

  • Peter Bell
  • Tobias Biester +
  • Evgeni Burovski
  • Thomas A Caswell
  • Ralf Gommers
  • Sturla Molden
  • Andrew Nelson
  • ofirr +
  • Sambit Panda
  • Ilhan Polat
  • Tyler Reddy
  • Atsushi Sakai
  • Pauli Virtanen

A total of 13 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.5.1

04 Jul 23:41
v1.5.1
Compare
Choose a tag to compare

SciPy 1.5.1 Release Notes

SciPy 1.5.1 is a bug-fix release with no new features
compared to 1.5.0. In particular, an issue where DLL loading
can fail for SciPy wheels on Windows with Python 3.6 has been
fixed.

Authors

  • Peter Bell
  • Loïc Estève
  • Philipp Thölke +
  • Tyler Reddy
  • Paul van Mulbregt
  • Pauli Virtanen
  • Warren Weckesser

A total of 7 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.5.0

21 Jun 17:30
v1.5.0
Compare
Choose a tag to compare

SciPy 1.5.0 Release Notes

SciPy 1.5.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.5.x branch, and on adding new features on the master branch.

This release requires Python 3.6+ and NumPy 1.14.5 or greater.

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

Highlights of this release

  • wrappers for more than a dozen new LAPACK routines are now available
    in scipy.linalg.lapack
  • Improved support for leveraging 64-bit integer size from linear algebra
    backends
  • addition of the probability distribution for two-sided one-sample
    Kolmogorov-Smirnov tests

New features

scipy.cluster improvements

Initialization of scipy.cluster.vq.kmeans2 using minit="++" had a
quadratic complexity in the number of samples. It has been improved, resulting
in a much faster initialization with quasi-linear complexity.

scipy.cluster.hierarchy.dendrogram now respects the matplotlib color
palette

scipy.fft improvements

A new keyword-only argument plan is added to all FFT functions in this
module. It is reserved for passing in a precomputed plan from libraries
providing a FFT backend (such as PyFFTW and mkl-fft), and it is
currently not used in SciPy.

scipy.integrate improvements

scipy.interpolate improvements

scipy.io improvements

scipy.io.wavfile error messages are more explicit about what's wrong, and
extraneous bytes at the ends of files are ignored instead of raising an error
when the data has successfully been read.

scipy.io.loadmat gained a simplify_cells parameter, which if set to
True simplifies the structure of the return value if the .mat file
contains cell arrays.

pathlib.Path objects are now supported in scipy.io Matrix Market I/O
functions

scipy.linalg improvements

scipy.linalg.eigh has been improved. Now various LAPACK drivers can be
selected at will and also subsets of eigenvalues can be requested via
subset_by_value keyword. Another keyword subset_by_index is introduced.
Keywords turbo and eigvals are deprecated.

Similarly, standard and generalized Hermitian eigenvalue LAPACK routines
?<sy/he>evx are added and existing ones now have full _lwork
counterparts.

Wrappers for the following LAPACK routines have been added to
scipy.linalg.lapack:

  • ?getc2: computes the LU factorization of a general matrix with complete
    pivoting
  • ?gesc2: solves a linear system given an LU factorization from ?getc2
  • ?gejsv: computes the singular value decomposition of a general matrix
    with higher accuracy calculation of tiny singular values and their
    corresponding singular vectors
  • ?geqrfp: computes the QR factorization of a general matrix with
    non-negative elements on the diagonal of R
  • ?gtsvx: solves a linear system with general tridiagonal matrix
  • ?gttrf: computes the LU factorization of a tridiagonal matrix
  • ?gttrs: solves a linear system given an LU factorization from ?gttrf
  • ?ptsvx: solves a linear system with symmetric positive definite
    tridiagonal matrix
  • ?pttrf: computes the LU factorization of a symmetric positive definite
    tridiagonal matrix
  • ?pttrs: solves a linear system given an LU factorization from ?pttrf
  • ?pteqr: computes the eigenvectors and eigenvalues of a positive definite
    tridiagonal matrix
  • ?tbtrs: solves a linear system with a triangular banded matrix
  • ?csd: computes the Cosine Sine decomposition of an orthogonal/unitary
    matrix

Generalized QR factorization routines (?geqrf) now have full _lwork
counterparts.

scipy.linalg.cossin Cosine Sine decomposition of unitary matrices has been
added.

The function scipy.linalg.khatri_rao, which computes the Khatri-Rao product,
was added.

The new function scipy.linalg.convolution_matrix constructs the Toeplitz
matrix representing one-dimensional convolution.

scipy.ndimage improvements

scipy.optimize improvements

The finite difference numerical differentiation used in various minimize
methods that use gradients has several new features:

  • 2-point, 3-point, or complex step finite differences can be used. Previously
    only a 2-step finite difference was available.
  • There is now the possibility to use a relative step size, previously only an
    absolute step size was available.
  • If the minimize method uses bounds the numerical differentiation strictly
    obeys those limits.
  • The numerical differentiation machinery now makes use of a simple cache,
    which in some cases can reduce the number of function evaluations.
  • minimize's method= 'powell' now supports simple bound constraints

There have been several improvements to scipy.optimize.linprog:

  • The linprog benchmark suite has been expanded considerably.
  • linprog's dense pivot-based redundancy removal routine and sparse
    presolve are faster
  • When scikit-sparse is available, solving sparse problems with
    method='interior-point' is faster

The caching of values when optimizing a function returning both value and
gradient together has been improved, avoiding repeated function evaluations
when using a HessianApproximation such as BFGS.

differential_evolution can now use the modern np.random.Generator as
well as the legacy np.random.RandomState as a seed.

scipy.signal improvements

A new optional argument include_nyquist is added to freqz functions in
this module. It is used for including the last frequency (Nyquist frequency).

scipy.signal.find_peaks_cwt now accepts a window_size parameter for the
size of the window used to calculate the noise floor.

scipy.sparse improvements

Outer indexing is now faster when using a 2d column vector to select column
indices.

scipy.sparse.lil.tocsr is faster

Fixed/improved comparisons between pydata sparse arrays and sparse matrices

BSR format sparse multiplication performance has been improved.

scipy.sparse.linalg.LinearOperator has gained the new ndim class
attribute

scipy.spatial improvements

scipy.spatial.geometric_slerp has been added to enable geometric
spherical linear interpolation on an n-sphere

scipy.spatial.SphericalVoronoi now supports calculation of region areas in 2D
and 3D cases

The tree building algorithm used by cKDTree has improved from quadratic
worst case time complexity to loglinear. Benchmarks are also now available for
building and querying of balanced/unbalanced kd-trees.

scipy.special improvements

The following functions now have Cython interfaces in cython_special:

  • scipy.special.erfinv
  • scipy.special.erfcinv
  • scipy.special.spherical_jn
  • scipy.special.spherical_yn
  • scipy.special.spherical_in
  • scipy.special.spherical_kn

scipy.special.log_softmax has been added to calculate the logarithm of softmax
function. It provides better accuracy than log(scipy.special.softmax(x)) for
inputs that make softmax saturate.

scipy.stats improvements

The function for generating random samples in scipy.stats.dlaplace has been
improved. The new function is approximately twice as fast with a memory
footprint reduction between 25 % and 60 % (see gh-11069).

scipy.stats functions that accept a seed for reproducible calculations using
random number generation (e.g. random variates from distributions) can now use
the modern np.random.Generator as well as the legacy
np.random.RandomState as a seed.

The axis parameter was added to scipy.stats.rankdata. This allows slices
of an array along the given axis to be ranked independently.

The axis parameter was added to scipy.stats.f_oneway, allowing it to
compute multiple one-way ANOVA tests for data stored in n-dimensional
arrays. The performance of f_oneway was also improved for some cases.

The PDF and CDF methods for stats.geninvgauss are now significantly faster
as the numerical integration to calculate the CDF uses a Cython based
LowLevelCallable.

Moments of the normal distribution (scipy.stats.norm) are now calculated using
analytical formulas instead of numerical integration for greater speed and
accuracy

Moments and entropy trapezoidal distribution (scipy.stats.trapz) are now
calculated using analytical formulas instead of numerical integration for
greater speed and accuracy

Methods of the truncated normal distribution (scipy.stats.truncnorm),
especially _rvs, are significantly faster after a complete rewrite.

The fit method of the Laplace distribution, scipy.stats.laplace, now uses
the analytical formulas for the maximum likelihood estimates of th...

Read more

SciPy 1.5.0rc2

14 Jun 02:36
v1.5.0rc2
Compare
Choose a tag to compare
SciPy 1.5.0rc2 Pre-release
Pre-release

SciPy 1.5.0 Release Notes

Note Scipy 1.5.0 is not released yet!

SciPy 1.5.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.5.x branch, and on adding new features on the master branch.

This release requires Python 3.6+ and NumPy 1.14.5 or greater.

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

Highlights of this release

  • wrappers for more than a dozen new LAPACK routines are now available
    in scipy.linalg.lapack
  • Improved support for leveraging 64-bit integer size from linear algebra
    backends
  • addition of the probability distribution for two-sided one-sample
    Kolmogorov-Smirnov tests

New features

scipy.cluster improvements

Initialization of scipy.cluster.vq.kmeans2 using minit="++" had a
quadratic complexity in the number of samples. It has been improved, resulting
in a much faster initialization with quasi-linear complexity.

scipy.cluster.hierarchy.dendrogram now respects the matplotlib color
palette

scipy.fft improvements

A new keyword-only argument plan is added to all FFT functions in this
module. It is reserved for passing in a precomputed plan from libraries
providing a FFT backend (such as PyFFTW and mkl-fft), and it is
currently not used in SciPy.

scipy.integrate improvements

scipy.interpolate improvements

scipy.io improvements

scipy.io.wavfile error messages are more explicit about what's wrong, and
extraneous bytes at the ends of files are ignored instead of raising an error
when the data has successfully been read.

scipy.io.loadmat gained a simplify_cells parameter, which if set to
True simplifies the structure of the return value if the .mat file
contains cell arrays.

pathlib.Path objects are now supported in scipy.io Matrix Market I/O
functions

scipy.linalg improvements

scipy.linalg.eigh has been improved. Now various LAPACK drivers can be
selected at will and also subsets of eigenvalues can be requested via
subset_by_value keyword. Another keyword subset_by_index is introduced.
Keywords turbo and eigvals are deprecated.

Similarly, standard and generalized Hermitian eigenvalue LAPACK routines
?<sy/he>evx are added and existing ones now have full _lwork
counterparts.

Wrappers for the following LAPACK routines have been added to
scipy.linalg.lapack:

  • ?getc2: computes the LU factorization of a general matrix with complete
    pivoting
  • ?gesc2: solves a linear system given an LU factorization from ?getc2
  • ?gejsv: computes the singular value decomposition of a general matrix
    with higher accuracy calculation of tiny singular values and their
    corresponding singular vectors
  • ?geqrfp: computes the QR factorization of a general matrix with
    non-negative elements on the diagonal of R
  • ?gtsvx: solves a linear system with general tridiagonal matrix
  • ?gttrf: computes the LU factorization of a tridiagonal matrix
  • ?gttrs: solves a linear system given an LU factorization from ?gttrf
  • ?ptsvx: solves a linear system with symmetric positive definite
    tridiagonal matrix
  • ?pttrf: computes the LU factorization of a symmetric positive definite
    tridiagonal matrix
  • ?pttrs: solves a linear system given an LU factorization from ?pttrf
  • ?pteqr: computes the eigenvectors and eigenvalues of a positive definite
    tridiagonal matrix
  • ?tbtrs: solves a linear system with a triangular banded matrix
  • ?csd: computes the Cosine Sine decomposition of an orthogonal/unitary
    matrix

Generalized QR factorization routines (?geqrf) now have full _lwork
counterparts.

scipy.linalg.cossin Cosine Sine decomposition of unitary matrices has been
added.

The function scipy.linalg.khatri_rao, which computes the Khatri-Rao product,
was added.

The new function scipy.linalg.convolution_matrix constructs the Toeplitz
matrix representing one-dimensional convolution.

scipy.ndimage improvements

scipy.optimize improvements

The finite difference numerical differentiation used in various minimize
methods that use gradients has several new features:

  • 2-point, 3-point, or complex step finite differences can be used. Previously
    only a 2-step finite difference was available.
  • There is now the possibility to use a relative step size, previously only an
    absolute step size was available.
  • If the minimize method uses bounds the numerical differentiation strictly
    obeys those limits.
  • The numerical differentiation machinery now makes use of a simple cache,
    which in some cases can reduce the number of function evaluations.
  • minimize's method= 'powell' now supports simple bound constraints

There have been several improvements to scipy.optimize.linprog:

  • The linprog benchmark suite has been expanded considerably.
  • linprog's dense pivot-based redundancy removal routine and sparse
    presolve are faster
  • When scikit-sparse is available, solving sparse problems with
    method='interior-point' is faster

The caching of values when optimizing a function returning both value and
gradient together has been improved, avoiding repeated function evaluations
when using a HessianApproximation such as BFGS.

differential_evolution can now use the modern np.random.Generator as
well as the legacy np.random.RandomState as a seed.

scipy.signal improvements

A new optional argument include_nyquist is added to freqz functions in
this module. It is used for including the last frequency (Nyquist frequency).

scipy.signal.find_peaks_cwt now accepts a window_size parameter for the
size of the window used to calculate the noise floor.

scipy.sparse improvements

Outer indexing is now faster when using a 2d column vector to select column
indices.

scipy.sparse.lil.tocsr is faster

Fixed/improved comparisons between pydata sparse arrays and sparse matrices

BSR format sparse multiplication performance has been improved.

scipy.sparse.linalg.LinearOperator has gained the new ndim class
attribute

scipy.spatial improvements

scipy.spatial.geometric_slerp has been added to enable geometric
spherical linear interpolation on an n-sphere

scipy.spatial.SphericalVoronoi now supports calculation of region areas in 2D
and 3D cases

The tree building algorithm used by cKDTree has improved from quadratic
worst case time complexity to loglinear. Benchmarks are also now available for
building and querying of balanced/unbalanced kd-trees.

scipy.special improvements

The following functions now have Cython interfaces in cython_special:

  • scipy.special.erfinv
  • scipy.special.erfcinv
  • scipy.special.spherical_jn
  • scipy.special.spherical_yn
  • scipy.special.spherical_in
  • scipy.special.spherical_kn

scipy.special.log_softmax has been added to calculate the logarithm of softmax
function. It provides better accuracy than log(scipy.special.softmax(x)) for
inputs that make softmax saturate.

scipy.stats improvements

The function for generating random samples in scipy.stats.dlaplace has been
improved. The new function is approximately twice as fast with a memory
footprint reduction between 25 % and 60 % (see gh-11069).

scipy.stats functions that accept a seed for reproducible calculations using
random number generation (e.g. random variates from distributions) can now use
the modern np.random.Generator as well as the legacy
np.random.RandomState as a seed.

The axis parameter was added to scipy.stats.rankdata. This allows slices
of an array along the given axis to be ranked independently.

The axis parameter was added to scipy.stats.f_oneway, allowing it to
compute multiple one-way ANOVA tests for data stored in n-dimensional
arrays. The performance of f_oneway was also improved for some cases.

The PDF and CDF methods for stats.geninvgauss are now significantly faster
as the numerical integration to calculate the CDF uses a Cython based
LowLevelCallable.

Moments of the normal distribution (scipy.stats.norm) are now calculated using
analytical formulas instead of numerical integration for greater speed and
accuracy

Moments and entropy trapezoidal distribution (scipy.stats.trapz) are now
calculated using analytical formulas instead of numerical integration for
greater speed and accuracy

Methods of the truncated normal distribution (scipy.stats.truncnorm),
especially _rvs, are significantly faster after a complete rewrite.

The fit method of the Laplace distribution, scipy.stats.laplace, now uses
the analytical formulas for t...

Read more

SciPy 1.5.0rc1

30 May 21:18
v1.5.0rc1
Compare
Choose a tag to compare
SciPy 1.5.0rc1 Pre-release
Pre-release

SciPy 1.5.0 Release Notes

Note: Scipy 1.5.0 is not released yet!

SciPy 1.5.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.5.x branch, and on adding new features on the master branch.

This release requires Python 3.6+ and NumPy 1.14.5 or greater.

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

Highlights of this release

  • wrappers for more than a dozen new LAPACK routines are now available
    in scipy.linalg.lapack
  • Improved support for leveraging 64-bit integer size from linear algebra
    backends
  • addition of the probability distribution for two-sided one-sample
    Kolmogorov-Smirnov tests

New features

scipy.cluster improvements

Initialization of scipy.cluster.vq.kmeans2 using minit="++" had a
quadratic complexity in the number of samples. It has been improved, resulting
in a much faster initialization with quasi-linear complexity.

scipy.cluster.hierarchy.dendrogram now respects the matplotlib color
palette

scipy.fft improvements

A new keyword-only argument plan is added to all FFT functions in this
module. It is reserved for passing in a precomputed plan from libraries
providing a FFT backend (such as PyFFTW and mkl-fft), and it is
currently not used in SciPy.

scipy.integrate improvements

scipy.interpolate improvements

scipy.io improvements

scipy.io.wavfile error messages are more explicit about what's wrong, and
extraneous bytes at the ends of files are ignored instead of raising an error
when the data has successfully been read.

scipy.io.loadmat gained a simplify_cells parameter, which if set to
True simplifies the structure of the return value if the .mat file
contains cell arrays.

pathlib.Path objects are now supported in scipy.io Matrix Market I/O
functions

scipy.linalg improvements

scipy.linalg.eigh has been improved. Now various LAPACK drivers can be
selected at will and also subsets of eigenvalues can be requested via
subset_by_value keyword. Another keyword subset_by_index is introduced.
Keywords turbo and eigvals are deprecated.

Similarly, standard and generalized Hermitian eigenvalue LAPACK routines
?<sy/he>evx are added and existing ones now have full _lwork
counterparts.

Wrappers for the following LAPACK routines have been added to
scipy.linalg.lapack:

  • ?getc2: computes the LU factorization of a general matrix with complete
    pivoting
  • ?gesc2: solves a linear system given an LU factorization from ?getc2
  • ?gejsv: computes the singular value decomposition of a general matrix
    with higher accuracy calculation of tiny singular values and their
    corresponding singular vectors
  • ?geqrfp: computes the QR factorization of a general matrix with
    non-negative elements on the diagonal of R
  • ?gtsvx: solves a linear system with general tridiagonal matrix
  • ?gttrf: computes the LU factorization of a tridiagonal matrix
  • ?gttrs: solves a linear system given an LU factorization from ?gttrf
  • ?ptsvx: solves a linear system with symmetric positive definite
    tridiagonal matrix
  • ?pttrf: computes the LU factorization of a symmetric positive definite
    tridiagonal matrix
  • ?pttrs: solves a linear system given an LU factorization from ?pttrf
  • ?pteqr: computes the eigenvectors and eigenvalues of a positive definite
    tridiagonal matrix
  • ?tbtrs: solves a linear system with a triangular banded matrix
  • ?csd: computes the Cosine Sine decomposition of an orthogonal/unitary
    matrix

Generalized QR factorization routines (?geqrf) now have full _lwork
counterparts.

scipy.linalg.cossin Cosine Sine decomposition of unitary matrices has been
added.

The function scipy.linalg.khatri_rao, which computes the Khatri-Rao product,
was added.

The new function scipy.linalg.convolution_matrix constructs the Toeplitz
matrix representing one-dimensional convolution.

scipy.ndimage improvements

scipy.optimize improvements

The finite difference numerical differentiation used in various minimize
methods that use gradients has several new features:

  • 2-point, 3-point, or complex step finite differences can be used. Previously
    only a 2-step finite difference was available.
  • There is now the possibility to use a relative step size, previously only an
    absolute step size was available.
  • If the minimize method uses bounds the numerical differentiation strictly
    obeys those limits.
  • The numerical differentiation machinery now makes use of a simple cache,
    which in some cases can reduce the number of function evaluations.
  • minimize's method= 'powell' now supports simple bound constraints

There have been several improvements to scipy.optimize.linprog:

  • The linprog benchmark suite has been expanded considerably.
  • linprog's dense pivot-based redundancy removal routine and sparse
    presolve are faster
  • When scikit-sparse is available, solving sparse problems with
    method='interior-point' is faster

The caching of values when optimizing a function returning both value and
gradient together has been improved, avoiding repeated function evaluations
when using a HessianApproximation such as BFGS.

differential_evolution can now use the modern np.random.Generator as
well as the legacy np.random.RandomState as a seed.

scipy.signal improvements

A new optional argument include_nyquist is added to freqz functions in
this module. It is used for including the last frequency (Nyquist frequency).

scipy.signal.find_peaks_cwt now accepts a window_size parameter for the
size of the window used to calculate the noise floor.

scipy.sparse improvements

Outer indexing is now faster when using a 2d column vector to select column
indices.

scipy.sparse.lil.tocsr is faster

Fixed/improved comparisons between pydata sparse arrays and sparse matrices

BSR format sparse multiplication performance has been improved.

scipy.sparse.linalg.LinearOperator has gained the new ndim class
attribute

scipy.spatial improvements

scipy.spatial.geometric_slerp has been added to enable geometric
spherical linear interpolation on an n-sphere

scipy.spatial.SphericalVoronoi now supports calculation of region areas in 2D
and 3D cases

The tree building algorithm used by cKDTree has improved from quadratic
worst case time complexity to loglinear. Benchmarks are also now available for
building and querying of balanced/unbalanced kd-trees.

scipy.special improvements

The following functions now have Cython interfaces in cython_special:

  • scipy.special.erfinv
  • scipy.special.erfcinv
  • scipy.special.spherical_jn
  • scipy.special.spherical_yn
  • scipy.special.spherical_in
  • scipy.special.spherical_kn

scipy.special.log_softmax has been added to calculate the logarithm of softmax
function. It provides better accuracy than log(scipy.special.softmax(x)) for
inputs that make softmax saturate.

scipy.stats improvements

The function for generating random samples in scipy.stats.dlaplace has been
improved. The new function is approximately twice as fast with a memory
footprint reduction between 25 % and 60 % (see gh-11069).

scipy.stats functions that accept a seed for reproducible calculations using
random number generation (e.g. random variates from distributions) can now use
the modern np.random.Generator as well as the legacy
np.random.RandomState as a seed.

The axis parameter was added to scipy.stats.rankdata. This allows slices
of an array along the given axis to be ranked independently.

The axis parameter was added to scipy.stats.f_oneway, allowing it to
compute multiple one-way ANOVA tests for data stored in n-dimensional
arrays. The performance of f_oneway was also improved for some cases.

The PDF and CDF methods for stats.geninvgauss are now significantly faster
as the numerical integration to calculate the CDF uses a Cython based
LowLevelCallable.

Moments of the normal distribution (scipy.stats.norm) are now calculated using
analytical formulas instead of numerical integration for greater speed and
accuracy

Moments and entropy trapezoidal distribution (scipy.stats.trapz) are now
calculated using analytical formulas instead of numerical integration for
greater speed and accuracy

Methods of the truncated normal distribution (scipy.stats.truncnorm),
especially _rvs, are significantly faster after a complete rewrite.

The fit method of the Laplace distribution, scipy.stats.laplace, now uses
the...

Read more

SciPy 1.2.3

21 Jan 17:46
v1.2.3
Compare
Choose a tag to compare

SciPy 1.2.3 Release Notes

SciPy 1.2.3 is a bug-fix release with no new features compared to 1.2.2. It is
part of the long-term support (LTS) release series for Python 2.7.

Authors

  • Geordie McBain
  • Matt Haberland
  • David Hagen
  • Tyler Reddy
  • Pauli Virtanen
  • Eric Larson
  • Yu Feng
  • ananyashreyjain
  • Nikolay Mayorov
  • Evgeni Burovski
  • Warren Weckesser

SciPy 1.4.1

19 Dec 15:57
v1.4.1
Compare
Choose a tag to compare

SciPy 1.4.1 Release Notes

SciPy 1.4.1 is a bug-fix release with no new features
compared to 1.4.0. Importantly, it aims to fix a problem
where an older version of pybind11 may cause a segmentation
fault when imported alongside incompatible libraries.

Authors

  • Ralf Gommers
  • Tyler Reddy