SciPy v1.4.0.rc2 Release Notes
Release Date: 2019-12-08 // almost 4 years ago-
π SciPy 1.4.0 Release Notes
Note : Scipy
1.4.0
is not released yet!SciPy
1.4.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 withpython -Wd
and check forDeprecationWarning
s).
π Our development attention will now shift to bug-fix releases on the
1.4.x branch, and on adding new features on the master branch.π This release requires Python
3.5+
and NumPy>=1.13.3
(for Python3.5
,3.6
),
>=1.14.5
(for Python3.7
),>= 1.17.3
(for Python3.8
)For running on PyPy, PyPy3 6.0+ and NumPy 1.15.0 are required.
π Highlights of this release
- a new submodule,
scipy.fft
, now supersedesscipy.fftpack
; this
π means support forlong double
transforms, faster multi-dimensional
π transforms, improved algorithm time complexity, release of the global
π intepreter lock, and control over threading behavior - π support for
pydata/sparse
arrays inscipy.sparse.linalg
- π substantial improvement to the documentation and functionality of
severalscipy.special
functions, and some new additions - the generalized inverse Gaussian distribution has been added to
scipy.stats
- an implementation of the Edmonds-Karp algorithm in
πscipy.sparse.csgraph.maximum_flow
- π
scipy.spatial.SphericalVoronoi
now supports n-dimensional input,
π has linear memory complexity, improved performance, and
π supports single-hemisphere generators
π New features
Infrastructure
π Documentation can now be built with
runtests.py --doc
π³ A
Dockerfile
is now available in thescipy/scipy-dev
repository to
facilitate getting started with SciPy development.scipy.constants
improvementsβ‘οΈ
scipy.constants
has been updated with the CODATA 2018 constants.scipy.fft
addedscipy.fft
is a new submodule that supersedes thescipy.fftpack
submodule.
For the most part, this is a drop-in replacement fornumpy.fft
and
scipy.fftpack
alike. With some important differences,scipy.fft
:- π uses NumPy's conventions for real transforms (
rfft
). This means the
return value is a complex array, half the size of the fullfft
output.
This is different from the output offftpack
which returned a real array
representing complex components packed together. - the inverse real to real transforms (
idct
andidst
) are normalized
fornorm=None
in thesame way asifft
. This means the identity
idct(dct(x)) == x
is nowTrue
for all norm modes. - does not include the convolutions or pseudo-differential operators
fromfftpack
.
This submodule is based on the
pypocketfft
library, developed by the
author ofpocketfft
which was recently adopted by NumPy as well.
pypocketfft
offers a number of advantages over fortranFFTPACK
:- π support for long double (
np.longfloat
) precision transforms. - faster multi-dimensional transforms using vectorisation
- π Bluesteinβs algorithm removes the worst-case
O(n^2)
complexity of
FFTPACK
- π the global interpreter lock (
GIL
) is released during transforms - π· optional multithreading of multi-dimensional transforms via the
workers
argument
π Note that
scipy.fftpack
has not been deprecated and will continue to be
maintained but is now considered legacy. New code is recommended to use
scipy.fft
instead, where possible.scipy.fftpack
improvementsscipy.fftpack
now uses pypocketfft to perform its FFTs, offering the same
speed and accuracy benefits listed for scipy.fft above but without the
π improved API.scipy.integrate
improvementsThe function
scipy.integrate.solve_ivp
now has anargs
argument.
This allows the user-defined functions passed to the function to have
β additional parameters without having to create wrapper functions or
lambda expressions for them.scipy.integrate.solve_ivp
can now return ay_events
attribute
representing the solution of the ODE at event timesπ New
OdeSolver
is implemented ---DOP853
. This is a high-order explicit
β Runge-Kutta method originally implemented in Fortran. Now we provide a pure
Python implementation usable throughsolve_ivp
with all its features.π
scipy.integrate.quad
provides better user feedback when break points are
specified with a weighted integrand.scipy.integrate.quad_vec
is now available for general purpose integration
of vector-valued functionsscipy.interpolate
improvementsscipy.interpolate.pade
now handles complex input data gracefullyscipy.interpolate.Rbf
can now interpolate multi-dimensional functionsscipy.io
improvementsscipy.io.wavfile.read
can now read data from aWAV
file that has a
π malformed header, similar to other modernWAV
file parsersπ»
scipy.io.FortranFile
now has an expanded set of availableException
classes for handling poorly-formatted filesscipy.linalg
improvementsThe function
scipy.linalg.subspace_angles(A, B)
now gives correct
results for complex-valued matrices. Before this, the function only returned
correct values for real-valued matrices.π New boolean keyword argument
check_finite
forscipy.linalg.norm
; whether
to check that the input matrix contains only finite numbers. Disabling may
π give a performance gain, but may result in problems (crashes, non-termination)
if the inputs do contain infinities or NaNs.π
scipy.linalg.solve_triangular
has improved performance for a C-ordered
triangular matrixLAPACK
wrappers have been added for?geequ
,?geequb
,?syequb
,
and?heequb
π Some performance improvements may be observed due to an internal optimization
in operations involving LAPACK routines via_compute_lwork
. This is
particularly true for operations on small arrays.Block
QR
wrappers are now available inscipy.linalg.lapack
scipy.ndimage
improvementsβ‘οΈ
scipy.optimize
improvementsIt is now possible to use linear and non-linear constraints with
β‘οΈscipy.optimize.differential_evolution
.scipy.optimize.linear_sum_assignment
has been re-written in C++ to improve
π performance, and now allows input costs to be infinite.A
ScalarFunction.fun_and_grad
method was added for convenient simultaneous
retrieval of a function and gradient evaluationπ
scipy.optimize.minimize
BFGS
method has improved performance by avoiding
duplicate evaluations in some casesπ Better user feedback is provided when an objective function returns an array
instead of a scalar.π¦
scipy.signal
improvementsβ Added a new function to calculate convolution using the overlap-add method,
π¦ namedscipy.signal.oaconvolve
. Likescipy.signal.fftconvolve
, this
π function supports specifying dimensions along which to do the convolution.π¦
scipy.signal.cwt
now supports complex wavelets.The implementation of
choose_conv_method
has been updated to reflect the
π new FFT implementation. In addition, the performance has been significantly
π improved (with rather drastic improvements in edge cases).The function
upfirdn
now has amode
keyword argument that can be used
π¦ to select the signal extension mode used at the signal boundaries. These modes
are also available for use inresample_poly
via a newly addedpadtype
argument.π
scipy.signal.sosfilt
now benefits from Cython code for improved performanceπ¦
scipy.signal.resample
should be more efficient by leveragingrfft
when
possibleπ
scipy.sparse
improvementsπ It is now possible to use the LOBPCG method in
scipy.sparse.linalg.svds
.π
scipy.sparse.linalg.LinearOperator
now supports the operationrmatmat
for adjoint matrix-matrix multiplication, in addition tormatvec
.β‘οΈ Multiple stability updates enable float32 support in the LOBPCG eigenvalue
solver for symmetric and Hermitian eigenvalues problems in
πscipy.sparse.linalg.lobpcg
.A solver for the maximum flow problem has been added as
πscipy.sparse.csgraph.maximum_flow
.scipy.sparse.csgraph.maximum_bipartite_matching
now allows non-square inputs,
π no longer requires a perfect matching to exist, and has improved performance.π
scipy.sparse.lil_matrix
conversions now perform better in some scenariosπ Basic support is available for
pydata/sparse
arrays in
πscipy.sparse.linalg
π
scipy.sparse.linalg.spsolve_triangular
now supports theunit_diagonal
argument to improve call signature similarity with its dense counterpart,
scipy.linalg.solve_triangular
π
assertAlmostEqual
may now be used with sparse matrices, which have added
support for__round__
scipy.spatial
improvementsβ¬οΈ The bundled Qhull library was upgraded to version 2019.1, fixing several
issues. Scipy-specific patches are no longer applied to it.scipy.spatial.SphericalVoronoi
now has linear memory complexity, improved
π performance, and supports single-hemisphere generators. Support has also been
β added for handling generators that lie on a great circle arc (geodesic input)
and for generators in n-dimensions.scipy.spatial.transform.Rotation
now includes functions for calculation of a
mean rotation, generation of the 3D rotation groups, and reduction of rotations
with rotational symmetries.scipy.spatial.transform.Slerp
is now callable with a scalar argumentscipy.spatial.voronoi_plot_2d
now supports furthest site Voronoi diagramsscipy.spatial.Delaunay
andscipy.spatial.Voronoi
now have attributes
for tracking whether they are furthest site diagramsscipy.special
improvementsThe Voigt profile has been added as
scipy.special.voigt_profile
.A real dispatch has been added for the Wright Omega function
(scipy.special.wrightomega
).The analytic continuation of the Riemann zeta function has been added. (The
Riemann zeta function is the one-argument variant ofscipy.special.zeta
.)The complete elliptic integral of the first kind (
scipy.special.ellipk
) is
now available inscipy.special.cython_special
.The accuracy of
scipy.special.hyp1f1
for real arguments has been improved.π The documentation of many functions has been improved.
scipy.stats
improvementsβ
scipy.stats.multiscale_graphcorr
added as an independence test that
operates on high dimensional and nonlinear data sets. It has higher statistical
β power than otherscipy.stats
tests while being the only one that operates on
multivariate data.The generalized inverse Gaussian distribution (
scipy.stats.geninvgauss
) has
been added.It is now possible to efficiently reuse
scipy.stats.binned_statistic_dd
with new values by providing the result of a previous call to the function.scipy.stats.hmean
now handles input with zeros more gracefully.The beta-binomial distribution is now available in
scipy.stats.betabinom
.scipy.stats.zscore
,scipy.stats.circmean
,scipy.stats.circstd
, and
πscipy.stats.circvar
now support thenan_policy
argument for enhanced
handling ofNaN
valuesscipy.stats.entropy
now accepts anaxis
argumentπ
scipy.stats.gaussian_kde.resample
now accepts aseed
argument to empower
reproducibilityπ
scipy.stats.kendalltau
performance has improved, especially for large inputs,
due to improved cache usageπ
scipy.stats.truncnorm
distribution has been rewritten to support much wider
tailsπ Deprecated features
π
scipy
deprecationsπ Support for NumPy functions exposed via the root SciPy namespace is deprecated
π and will be removed in 2.0.0. For example, if you usescipy.rand
or
scipy.diag
, you should change your code to directly use
0οΈβ£numpy.random.default_rng
ornumpy.diag
, respectively.
π They remain available in the currently continuing Scipy 1.x release series.π» The exception to this rule is using
scipy.fft
as a function --
:mod:scipy.fft
is now meant to be used only as a module, so the ability to
π callscipy.fft(...)
will be removed in SciPy 1.5.0.In
scipy.spatial.Rotation
methodsfrom_dcm
,as_dcm
were renamed to
from_matrix
,as_matrix
respectively. The old names will be removed in
SciPy 1.6.0.π Method
Rotation.match_vectors
was deprecated in favor of
Rotation.align_vectors
, which provides a more logical and
general API to the same functionality. The old method
π will be removed in SciPy 1.6.0.Backwards incompatible changes
scipy.special
changesπ The deprecated functions
hyp2f0
,hyp1f2
, andhyp3f0
have been
β removed.The deprecated function
bessel_diff_formula
has been removed.The function
i0
is no longer registered withnumpy.dual
, so that
numpy.dual.i0
will unconditionally refer to the NumPy version regardless
of whetherscipy.special
is imported.The function
expn
has been changed to returnnan
outside of its
domain of definition (x, n < 0
) instead ofinf
.π
scipy.sparse
changesπ Sparse matrix reshape now raises an error if shape is not two-dimensional,
rather than guessing what was meant. The behavior is now the same as before
SciPy 1.1.0.π
CSR
andCSC
sparse matrix classes should now return empty matrices
of the same type when indexed out of bounds. Previously, for some versions
of SciPy, this would raise anIndexError
. The change is largely motivated
by greater consistency withndarray
andnumpy.matrix
semantics.π¦
scipy.signal
changesπ¦
scipy.signal.resample
behavior for length-1 signal inputs has been
π fixed to output a constant (DC) value rather than an impulse, consistent with
π¦ the assumption of signal periodicity in the FFT method.π¦
scipy.signal.cwt
now performs complex conjugation and time-reversal of
π wavelet data, which is a backwards-incompatible bugfix for
time-asymmetric wavelets.scipy.stats
changesπ
scipy.stats.loguniform
added with better documentation as (an alias for
scipy.stats.reciprocal
).loguniform
generates random variables
π² that are equally likely in the log space; e.g.,1
,10
and100
are all equally likely ifloguniform(10 **0, 10** 2).rvs()
is used.Other changes
The
LSODA
method ofscipy.integrate.solve_ivp
now correctly detects stiff
problems.scipy.spatial.cKDTree
now accepts and correctly handles empty input datascipy.stats.binned_statistic_dd
now calculates the standard deviation
statistic in a numerically stable way.scipy.stats.binned_statistic_dd
now throws an error if the input data
contains eithernp.nan
ornp.inf
. Similarly, inscipy.stats
now all
continuous distributions'.fit()
methods throw an error if the input data
contain any instance of eithernp.nan
ornp.inf
.Authors
- @endolith
- @wenhui-prudencemed +
- Abhinav +
- Anne Archibald
- ashwinpathak20nov1996 +
- Danilo Augusto +
- Nelson Auner +
- aypiggott +
- Christoph Baumgarten
- Peter Bell
- Sebastian Berg
- Arman Bilge +
- Benedikt Boecking +
- Christoph Boeddeker +
- Daniel Bunting
- Evgeni Burovski
- Angeline Burrell +
- Angeline G. Burrell +
- CJ Carey
- Carlos Ramos CarreΓ±o +
- Mak Sze Chun +
- Malayaja Chutani +
- Christian Clauss +
- Jonathan Conroy +
- Stephen P Cook +
- Dylan Cutler +
- Anirudh Dagar +
- Aidan Dang +
- dankleeman +
- Brandon David +
- Tyler Dawson +
- Dieter WerthmΓΌller
- Joe Driscoll +
- Jakub Dyczek +
- DΓ‘vid BodnΓ‘r
- Fletcher Easton +
- Stefan Endres
- etienne +
- Johann Faouzi
- Yu Feng
- Isuru Fernando +
- Matthew H Flamm
- Martin Gauch +
- Gabriel Gerlero +
- Ralf Gommers
- Chris Gorgolewski +
- Domen Gorjup +
- Edouard Goudenhoofdt +
- Jan Gwinner +
- Maja Gwozdz +
- Matt Haberland
- hadshirt +
- Pierre Haessig +
- David Hagen
- Charles Harris
- Gina Helfrich +
- Alex Henrie +
- Francisco J. Hernandez Heras +
- Andreas Hilboll
- Lindsey Hiltner
- Thomas Hisch
- Min ho Kim +
- Gert-Ludwig Ingold
- jakobjakobson13 +
- Todd Jennings
- He Jia
- Muhammad Firmansyah Kasim +
- Andrew Knyazev +
- Holger Kohr +
- Mateusz Konieczny +
- Krzysztof PiΓ³ro +
- Philipp Lang +
- Peter Mahler Larsen +
- Eric Larson
- Antony Lee
- Gregory R. Lee
- Chelsea Liu +
- Jesse Livezey
- Peter Lysakovski +
- Jason Manley +
- Michael Marien +
- Nikolay Mayorov
- G. D. McBain +
- Sam McCormack +
- Melissa Weber MendonΓ§a +
- Kevin Michel +
- mikeWShef +
- Sturla Molden
- Eric Moore
- Peyton Murray +
- Andrew Nelson
- Clement Ng +
- Juan Nunez-Iglesias
- Renee Otten +
- Kellie Ottoboni +
- Ayappan P
- Sambit Panda +
- Tapasweni Pathak +
- Oleksandr Pavlyk
- Fabian Pedregosa
- Petar MlinariΔ
- Matti Picus
- Marcel Plch +
- Christoph Pohl +
- Ilhan Polat
- Siddhesh Poyarekar +
- Ioannis Prapas +
- James Alan Preiss +
- Yisheng Qiu +
- Eric Quintero
- Bharat Raghunathan +
- Tyler Reddy
- Joscha Reimer
- Antonio Horta Ribeiro
- Lucas Roberts
- rtshort +
- Josua Sassen
- Kevin Sheppard
- Scott Sievert
- Leo Singer
- Kai Striega
- SΓΈren Fuglede JΓΈrgensen
- tborisow +
- Γtienne Tremblay +
- tuxcell +
- Miguel de Val-Borro
- Andrew Valentine +
- Hugo van Kemenade
- Paul van Mulbregt
- Sebastiano Vigna
- Pauli Virtanen
- Dany Vohl +
- Ben Walsh +
- Huize Wang +
- Warren Weckesser
- Anreas Weh +
- Joseph Weston +
- Adrian Wijaya +
- Timothy Willard +
- Josh Wilson
- Kentaro Yamamoto +
- Dave Zbarsky +
π A total of 142 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. - a new submodule,