3 min read

Yesterday, the SciPy community released SciPy 1.2.0. This release contains many new features such as numerous bug-fixes, improved test coverage, and better documentation. This release also includes a number of deprecations and API changes. This release requires Python 2.7 or 3.4+ and NumPy 1.8.2 or greater. The functions hyp2f0, hyp1f2 and hyp3f0 in scipy.special have
been deprecated.

According to the community, “this will be the last SciPy release to support Python 2.7. Consequently, the 1.2.x series will be long term support (LTS) release; we will backport bug fixes until 1 Jan 2020”.

Highlights of SciPy 1.2.0

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

New improvements in SciPy 1.2.0

scipy.ndimage improvements

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

scipy.fftpack improvements

Scipy.fftpack now supports DCT-IV, DST-IV, DCT-I, and DST-I orthonormalization.

scipy.interpolate improvements

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

scipy.cluster improvements

scipy.cluster.vq.kmeans2 has now gained a new initialization method known as kmeans++.

scipy.special improvements

The function softmax has been 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.newton can now accept a scalar or an array.

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.

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.

scipy.spatial improvements

The function scipy.spatial.distance.jaccard has been 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.
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

Levy Stable Parameter Estimation, PDF, and CDF calculations are now supported
for scipy.stats.levy_stable. stats and mstats now have access to a new regression method,
siegelslopes, a robust linear regression algorithm. 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.
To know more about the SciPy 1.2.0 and the its backward incompatible changes, read the release notes on GitHub.

Read Next

Implementing matrix operations using SciPy and NumPy

How to Compute Interpolation in SciPy

How to compute Discrete Fourier Transform (DFT) using SciPy

 

A Data science fanatic. Loves to be updated with the tech happenings around the globe. Loves singing and composing songs. Believes in putting the art in smart.