SciPy v1.4.0.rc1 Release Notes

Release Date: 2019-11-22 // about 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 with python -Wd and check for DeprecationWarning 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 Python 3.5, 3.6),
    >=1.14.5 (for Python 3.7), >= 1.17.3 (for Python 3.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 supersedes scipy.fftpack; this
      πŸ‘ means support for long 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 in scipy.sparse.linalg
    • πŸ“š substantial improvement to the documentation and functionality of
      several scipy.special functions, and some new additions
    • the generalized inverse Gaussian distribution has been added to
    • 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


    πŸ“š Documentation can now be built with --doc

    🐳 A Dockerfile is now available in the scipy/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 added

    scipy.fft is a new submodule that supersedes the scipy.fftpack submodule.
    For the most part, this is a drop-in replacement for numpy.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 full fft output.
      This is different from the output of fftpack which returned a real array
      representing complex components packed together.
    • the inverse real to real transforms (idct and idst) are normalized
      for norm=None in thesame way as ifft. This means the identity
      idct(dct(x)) == x is now True for all norm modes.
    • does not include the convolutions or pseudo-differential operators
      from fftpack.

    This submodule is based on the pypocketfft library, developed by the
    author of pocketfft which was recently adopted by NumPy as well.
    pypocketfft offers a number of advantages over fortran FFTPACK:

    • πŸ‘Œ 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
    • πŸš€ the global interpreter lock (GIL) is released during transforms
    • πŸ‘· optional multithreading of multi-dimensional transforms via the workers

    πŸ—„ 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 improvements

    scipy.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 improvements

    The function scipy.integrate.solve_ivp now has an args 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 a y_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 through solve_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 functions

    scipy.interpolate improvements

    scipy.interpolate.pade now handles complex input data gracefully

    scipy.interpolate.Rbf can now interpolate multi-dimensional functions improvements can now read data from a WAV file that has a
    πŸ“œ malformed header, similar to other modern WAV file parsers

    πŸ‘» now has an expanded set of available Exception
    classes for handling poorly-formatted files

    scipy.linalg improvements

    The 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 for scipy.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 matrix

    LAPACK 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 in scipy.linalg.lapack

    scipy.ndimage improvements

    ⚑️ scipy.optimize improvements

    It 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,
    🚦 named scipy.signal.oaconvolve. Like scipy.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 a mode keyword argument that can be used
    🚦 to select the signal extension mode used at the signal boundaries. These modes
    are also available for use in resample_poly via a newly added padtype

    🐎 scipy.signal.sosfilt now benefits from Cython code for improved performance

    🚦 scipy.signal.resample should be more efficient by leveraging rfft when

    πŸ“œ scipy.sparse improvements

    πŸ“œ It is now possible to use the LOBPCG method in scipy.sparse.linalg.svds.

    πŸ“œ scipy.sparse.linalg.LinearOperator now supports the operation rmatmat
    for adjoint matrix-matrix multiplication, in addition to rmatvec.

    ⚑️ 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 the unit_diagonal
    argument to improve call signature similarity with its dense counterpart,

    πŸ“œ 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 argument

    scipy.spatial.voronoi_plot_2d now supports furthest site Voronoi diagrams

    scipy.spatial.Delaunay and scipy.spatial.Voronoi now have attributes
    for tracking whether they are furthest site diagrams

    scipy.special improvements

    The Voigt profile has been added as scipy.special.voigt_profile.

    A real dispatch has been added for the Wright Omega function

    The analytic continuation of the Riemann zeta function has been added. (The
    Riemann zeta function is the one-argument variant of scipy.special.zeta.)

    The complete elliptic integral of the first kind (scipy.special.ellipk) is
    now available in scipy.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 other scipy.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 the nan_policy argument for enhanced
    handling of NaN values

    scipy.stats.entropy now accepts an axis argument

    πŸ‘€ scipy.stats.gaussian_kde.resample now accepts a seed argument to empower

    scipy.stats.multiscale_graphcorr has been added for calculation of the
    βœ… multiscale graph correlation (MGC) test statistic

    🐎 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

    πŸ—„ 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 use scipy.rand or
    scipy.diag, you should change your code to directly use
    0️⃣ numpy.random.default_rng or numpy.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
    🚚 call scipy.fft(...) will be removed in SciPy 1.5.0.

    In scipy.spatial.Rotation methods from_dcm, as_dcm were renamed to
    from_matrix, as_matrix respectively. The old names will be removed in
    SciPy 1.6.0.

    Backwards incompatible changes

    scipy.special changes

    πŸ—„ The deprecated functions hyp2f0, hyp1f2, and hyp3f0 have been
    βœ‚ removed.

    The deprecated function bessel_diff_formula has been removed.

    The function i0 is no longer registered with numpy.dual, so that
    numpy.dual.i0 will unconditionally refer to the NumPy version regardless
    of whether scipy.special is imported.

    The function expn has been changed to return nan outside of its
    domain of definition (x, n < 0) instead of inf.

    πŸ“œ 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.

    scipy.spatial changes

    0️⃣ The default behavior of the match_vectors method of
    scipy.spatial.transform.Rotation was changed for input vectors
    that are not normalized and not of equal lengths.
    Previously, such vectors would be normalized within the method.
    Now, the calculated rotation takes the vector length into account, longer
    πŸ‘€ vectors will have a larger weight. For more details, see

    🚦 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 and 100
    are all equally likely if loguniform(10 **0, 10** 2).rvs() is used.

    Other changes

    The LSODA method of scipy.integrate.solve_ivp now correctly detects stiff

    scipy.spatial.cKDTree now accepts and correctly handles empty input data

    scipy.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 either np.nan or np.inf. Similarly, in scipy.stats now all
    continuous distributions' .fit() methods throw an error if the input data
    contain any instance of either np.nan or np.inf.


    • @endolith
    • 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 141 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.