Search for a command to run...
SciPy 1.6.0 Release Notes SciPy <code>1.6.0</code> 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 <code>python -Wd</code> and check for <code>DeprecationWarning</code> s). Our development attention will now shift to bug-fix releases on the <code>1.6.x</code> branch, and on adding new features on the master branch. This release requires Python <code>3.7+</code> and NumPy <code>1.16.5</code> or greater. For running on PyPy, PyPy3 <code>6.0+</code> is required. Highlights of this release <code>scipy.ndimage</code> improvements: Fixes and ehancements to boundary extension modes for interpolation functions. Support for complex-valued inputs in many filtering and interpolation functions. New <code>grid_mode</code> option for <code>scipy.ndimage.zoom</code> to enable results consistent with scikit-image's <code>rescale</code>. <code>scipy.optimize.linprog</code> has fast, new methods for large, sparse problems from the <code>HiGHS</code> library. <code>scipy.stats</code> improvements including new distributions, a new test, and enhancements to existing distributions and tests New features <code>scipy.special</code> improvements <code>scipy.special</code> now has improved support for 64-bit <code>LAPACK</code> backend <code>scipy.odr</code> improvements <code>scipy.odr</code> now has support for 64-bit integer <code>BLAS</code> <code>scipy.odr.ODR</code> has gained an optional <code>overwrite</code> argument so that existing files may be overwritten. <code>scipy.integrate</code> 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: <code>integrate.simps</code> was renamed to <code>integrate.simpson</code> <code>integrate.trapz</code> was renamed to <code>integrate.trapezoid</code> <code>integrate.cumtrapz</code> was renamed to <code>integrate.cumulative_trapezoid</code> <code>scipy.cluster</code> improvements <code>scipy.cluster.hierarchy.DisjointSet</code> has been added for incremental connectivity queries. <code>scipy.cluster.hierarchy.dendrogram</code> return value now also includes leaf color information in <code>leaves_color_list</code>. <code>scipy.interpolate</code> improvements <code>scipy.interpolate.interp1d</code> has a new method <code>nearest-up</code>, similar to the existing method <code>nearest</code> but rounds half-integers up instead of down. <code>scipy.io</code> 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. <code>scipy.linalg</code> improvements The new function <code>scipy.linalg.matmul_toeplitz</code> uses the FFT to compute the product of a Toeplitz matrix with another matrix. <code>scipy.linalg.sqrtm</code> and <code>scipy.linalg.logm</code> have performance improvements thanks to additional Cython code. Python <code>LAPACK</code> wrappers have been added for <code>pptrf</code>, <code>pptrs</code>, <code>ppsv</code>, <code>pptri</code>, and <code>ppcon</code>. <code>scipy.linalg.norm</code> and the <code>svd</code> family of functions will now use 64-bit integer backends when available. <code>scipy.ndimage</code> improvements <code>scipy.ndimage.convolve</code>, <code>scipy.ndimage.correlate</code> 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. <code>gaussian_filter</code>, <code>uniform_filter</code>, etc.). Multiple fixes and enhancements to boundary handling were introduced to <code>scipy.ndimage</code> interpolation functions (i.e. <code>affine_transform</code>, <code>geometric_transform</code>, <code>map_coordinates</code>, <code>rotate</code>, <code>shift</code>, <code>zoom</code>). A new boundary mode, <code>grid-wrap</code> 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 <code>wrap</code> mode which uses a period that is one sample smaller than the original signal extent along each dimension. A long-standing bug in the <code>reflect</code> boundary condition has been fixed and the mode <code>grid-mirror</code> was introduced as a synonym for <code>reflect</code>. A new boundary mode, <code>grid-constant</code> is now available. This is similar to the existing ndimage <code>constant</code> mode, but interpolation will still performed at coordinate values outside of the original image extent. This <code>grid-constant</code> mode is consistent with OpenCV's <code>BORDER_CONSTANT</code> mode and scikit-image's <code>constant</code> mode. Spline pre-filtering (used internally by <code>ndimage</code> interpolation functions when <code>order >= 2</code>), now supports all boundary modes rather than always defaulting to mirror boundary conditions. The standalone functions <code>spline_filter</code> and <code>spline_filter1d</code> have analytical boundary conditions that match modes <code>mirror</code>, <code>grid-wrap</code> and <code>reflect</code>. <code>scipy.ndimage</code> interpolation functions now accept complex-valued inputs. In this case, the interpolation is applied independently to the real and imaginary components. The <code>ndimage</code> 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. <code>scipy.ndimage.zoom</code> now has a <code>grid_mode</code> 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 <code>resize</code> and <code>rescale</code> functions (and OpenCV's <code>cv2.resize</code>). <code>scipy.optimize</code> improvements <code>scipy.optimize.linprog</code> has fast, new methods for large, sparse problems from the <code>HiGHS</code> C++ library. <code>method='highs-ds'</code> uses a high performance dual revised simplex implementation (HSOL), <code>method='highs-ipm'</code> uses an interior-point method with crossover, and <code>method='highs'</code> chooses between the two automatically. These methods are typically much faster and often exceed the accuracy of other <code>linprog</code> methods, so we recommend explicitly specifying one of these three method values when using <code>linprog</code>. <code>scipy.optimize.quadratic_assignment</code> has been added for approximate solution of the quadratic assignment problem. <code>scipy.optimize.linear_sum_assignment</code> now has a substantially reduced overhead for small cost matrix sizes <code>scipy.optimize.least_squares</code> has improved performance when the user provides the jacobian as a sparse jacobian already in <code>csr_matrix</code> format <code>scipy.optimize.linprog</code> now has an <code>rr_method</code> 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. <code>scipy.signal</code> improvements <code>scipy.signal.gammatone</code> has been added to design FIR or IIR filters that model the human auditory system. <code>scipy.signal.iircomb</code> has been added to design IIR peaking/notching comb filters that can boost/attenuate a frequency from a signal. <code>scipy.signal.sosfilt</code> performance has been improved to avoid some previously- observed slowdowns <code>scipy.signal.windows.taylor</code> has been added--the Taylor window function is commonly used in radar digital signal processing <code>scipy.signal.gauss_spline</code> now supports <code>list</code> type input for consistency with other related SciPy functions <code>scipy.signal.correlation_lags</code> has been added to allow calculation of the lag/ displacement indices array for 1D cross-correlation. <code>scipy.sparse</code> improvements A solver for the minimum weight full matching problem for bipartite graphs, also known as the linear assignment problem, has been added in <code>scipy.sparse.csgraph.min_weight_full_bipartite_matching</code>. In particular, this provides functionality analogous to that of <code>scipy.optimize.linear_sum_assignment</code>, 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 <code>scipy.sparse.block_diag</code> has been improved dramatically from quadratic to linear. <code>scipy.sparse.linalg</code> improvements The vendored version of <code>SuperLU</code> has been updated <code>scipy.fft</code> improvements The vendored <code>pocketfft</code> library now supports compiling with ARM neon vector extensions and has improved thread pool behavior. <code>scipy.spatial</code> improvements The python implementation of <code>KDTree</code> has been dropped and <code>KDTree</code> is now implemented in terms of <code>cKDTree</code>. You can now expect <code>cKDTree</code>-like performance by default. This also means <code>sys.setrecursionlimit</code> no longer needs to be increased for querying large trees. <code>transform.Rotation</code> has been updated with support for Modified Rodrigues Parameters alongside the existing rotation representations (PR gh-12667). <code>scipy.spatial.transform.Rotation</code> has been partially cythonized, with some performance improvements observed <code>scipy.spatial.distance.cdist</code> has improved perfor