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``
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``.
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.
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.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
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`.
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.
The default method for ``linprog`` is now ``'interior-point'``. The method's robustness and speed come at a cost: solutions may not be accurate to machine precision or correspond with a vertex of the polytope defined by the constraints. To revert to the original simplex method, include the argument ``method='simplex'``.
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 reported issues.
Fixed normal approximation in case ``zero_method == "pratt"`` in `scipy.stats.wilcoxon`.
Fixes for incorrect probabilities, broadcasting issues and thread-safety related to stats distributions setting member variables inside ``_argcheck()``.
`scipy.optimize.newton` now correctly raises a ``RuntimeError``, when default arguments are used, in the case that a derivative of value zero is obtained, which is a special case of failing to converge.
A draft toolchain roadmap is now available, laying out a compatibility plan including Python versions, C standards, and NumPy versions.
* ananyashreyjain + * ApamNapat + * Scott Calabrese Barton + * Christoph Baumgarten * Peter Bell + * Jacob Blomgren + * Doctor Bob + * Mana Borwornpadungkitti + * Matthew Brett * Evgeni Burovski * CJ Carey * Vega Theil Carstensen + * Robert Cimrman * Forrest Collman + * Pietro Cottone + * David + * Idan David + * Christoph Deil * Dieter Werthmüller * Conner DiPaolo + * Dowon * Michael Dunphy + * Peter Andreas Entschev + * Gökçen Eraslan + * Johann Faouzi + * Yu Feng * Piotr Figiel + * Matthew H Flamm * Franz Forstmayr + * Christoph Gohlke * Richard Janis Goldschmidt + * Ralf Gommers * Lars Grueter * Sylvain Gubian * Matt Haberland * Yaroslav Halchenko * Charles Harris * Lindsey Hiltner * JakobStruye + * He Jia + * Jwink3101 + * Greg Kiar + * Julius Bier Kirkegaard * John Kirkham + * Thomas Kluyver * Vladimir Korolev + * Joseph Kuo + * Michael Lamparski + * Eric Larson * Denis Laxalde * Katrin Leinweber * Jesse Livezey * ludcila + * Dhruv Madeka + * Magnus + * Nikolay Mayorov * Mark Mikofski * Jarrod Millman * Markus Mohrhard + * Eric Moore * Andrew Nelson * Aki Nishimura + * OGordon100 + * Petar Mlinarić + * Stefan Peterson * Matti Picus + * Ilhan Polat * Aaron Pries + * Matteo Ravasi + * Tyler Reddy * Ashton Reimer + * Joscha Reimer * rfezzani + * Riadh + * Lucas Roberts * Heshy Roskes + * Mirko Scholz + * Taylor D. Scott + * Srikrishna Sekhar + * Kevin Sheppard + * Sourav Singh * skjerns + * Kai Striega * SyedSaifAliAlvi + * Gopi Manohar T + * Albert Thomas + * Timon + * Paul van Mulbregt * Jacob Vanderplas * Daniel Vargas + * Pauli Virtanen * VNMabus + * Stefan van der Walt * Warren Weckesser * Josh Wilson * Nate Yoder + * Roman Yurchak
A total of 97 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.
Issues closed for 1.3.0 -------------------------------
On 5/17/19, Tyler Reddy <[hidden email]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> Hi all,
> On behalf of the SciPy development team I'm pleased to announce
> the release of SciPy 1.3.0.
A big "thank you" to everyone who contributed to 1.3.0, and especially
to Tyler for managing the release so well. Congatulations!