Releases: scipy/scipy
SciPy 1.0.0b1
This is the beta release for SciPy 1.0.0
SciPy 1.0.0 Release Notes
.. note:: Scipy 1.0.0 is not released yet!
.. contents::
SciPy 1.0.0 is the culmination of 8 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. Moreover, our development attention
will now shift to bug-fix releases on the 1.0.x branch, and on adding
new features on the master branch.
Some of the highlights of this release are:
- Major build improvements. Windows wheels are available on PyPI for the
first time, and continuous integration has been set up on Windows and OS X
in addition to Linux. - A set of new ODE solvers and a unified interface to them
(scipy.integrate.solve_ivp
). - Two new trust region optimizers and a new linear programming method, with
improved performance compared to whatscipy.optimize
offered previously. - Many new BLAS and LAPACK functions were wrapped. The BLAS wrappers are now
complete.
This release requires Python 2.7 or 3.4+ and NumPy 1.8.2 or greater.
This is also the last release to support LAPACK 3.1.x - 3.3.x. Moving the
lowest supported LAPACK version to >3.2.x was long blocked by Apple Accelerate
providing the LAPACK 3.2.1 API. We have decided that it's time to either drop
Accelerate or, if there is enough interest, provide shims for functions added
in more recent LAPACK versions so it can still be used.
New features
scipy.cluster
improvements
scipy.cluster.hierarchy.optimal_leaf_ordering
, a function to reorder a
linkage matrix to minimize distances between adjacent leaves, was added.
scipy.fftpack
improvements
N-dimensional versions of the discrete sine and cosine transforms and their
inverses were added as dctn
, idctn
, dstn
and idstn
.
scipy.integrate
improvements
A set of new ODE solvers have been added to scipy.integrate
. The convenience
function scipy.integrate.solve_ivp
allows uniform access to all solvers.
The individual solvers (RK23
, RK45
, Radau
, BDF
and LSODA
)
can also be used directly.
scipy.linalg
improvements
The BLAS wrappers in scipy.linalg.blas
have been completed. Added functions
are *gbmv
, *hbmv
, *hpmv
, *hpr
, *hpr2
, *spmv
, *spr
,
*tbmv
, *tbsv
, *tpmv
, *tpsv
, *trsm
, *trsv
, *sbmv
,
*spr2
,
Wrappers for the LAPACK functions *gels
, *stev
, *sytrd
, *hetrd
,
*sytf2
, *hetrf
, *sytrf
, *sycon
, *hecon
, *gglse
,
*stebz
, *stemr
, *sterf
, and *stein
have been added.
The function scipy.linalg.subspace_angles
has been added to compute the
subspace angles between two matrices.
The function scipy.linalg.clarkson_woodruff_transform
has been added.
It finds low-rank matrix approximation via the Clarkson-Woodruff Transform.
The functions scipy.linalg.eigh_tridiagonal
and
scipy.linalg.eigvalsh_tridiagonal
, which find the eigenvalues and
eigenvectors of tridiagonal hermitian/symmetric matrices, were added.
scipy.ndimage
improvements
Support for homogeneous coordinate transforms has been added to
scipy.ndimage.affine_transform
.
The ndimage
C code underwent a significant refactoring, and is now
a lot easier to understand and maintain.
scipy.optimize
improvements
The methods trust-region-exact
and trust-krylov
have been added to the
function scipy.optimize.minimize
. These new trust-region methods solve the
subproblem with higher accuracy at the cost of more Hessian factorizations
(compared to dogleg) or more matrix vector products (compared to ncg) but
usually require less nonlinear iterations and are able to deal with indefinite
Hessians. They seem very competitive against the other Newton methods
implemented in scipy.
scipy.optimize.linprog
gained an interior point method. Its performance is
superior (both in accuracy and speed) to the older simplex method.
scipy.signal
improvements
An argument fs
(sampling frequency) was added to the following functions:
firwin
, firwin2
, firls
, and remez
. This makes these functions
consistent with many other functions in scipy.signal
in which the sampling
frequency can be specified.
scipy.signal.freqz
has been sped up significantly for FIR filters.
scipy.sparse
improvements
Iterating over and slicing of CSC and CSR matrices is now faster by up to ~35%.
The tocsr
method of COO matrices is now several times faster.
The diagonal
method of sparse matrices now takes a parameter, indicating
which diagonal to return.
scipy.sparse.linalg
improvements
A new iterative solver for large-scale nonsymmetric sparse linear systems,
scipy.sparse.linalg.gcrotmk
, was added. It implements GCROT(m,k)
, a
flexible variant of GCROT
.
scipy.sparse.linalg.lsmr
now accepts an initial guess, yielding potentially
faster convergence.
SuperLU was updated to version 5.2.1.
scipy.spatial
improvements
Many distance metrics in scipy.spatial.distance
gained support for weights.
The signatures of scipy.spatial.distance.pdist
and
scipy.spatial.distance.cdist
were changed to *args, **kwargs
in order to
support a wider range of metrics (e.g. string-based metrics that need extra
keywords). Also, an optional out
parameter was added to pdist
and
cdist
allowing the user to specify where the resulting distance matrix is
to be stored
scipy.stats
improvements
The methods cdf
and logcdf
were added to
scipy.stats.multivariate_normal
, providing the cumulative distribution
function of the multivariate normal distribution.
New statistical distance functions were added, namely
scipy.stats.wasserstein_distance
for the first Wasserstein distance and
scipy.stats.energy_distance
for the energy distance.
Deprecated features
The following functions in scipy.misc
are deprecated: bytescale
,
fromimage
, imfilter
, imread
, imresize
, imrotate
,
imsave
, imshow
and toimage
. Most of those functions have unexpected
behavior (like rescaling and type casting image data without the user asking
for that). Other functions simply have better alternatives.
scipy.interpolate.interpolate_wrapper
and all functions in that submodule
are deprecated. This was a never finished set of wrapper functions which is
not relevant anymore.
The fillvalue
of scipy.signal.convolve2d
will be cast directly to the
dtypes of the input arrays in the future and checked that it is a scalar or
an array with a single element.
Backwards incompatible changes
The following deprecated functions have been removed from scipy.stats
:
betai
, chisqprob
, f_value
, histogram
, histogram2
,
pdf_fromgamma
, signaltonoise
, square_of_sums
, ss
and
threshold
.
The following deprecated functions have been removed from scipy.stats.mstats
:
betai
, f_value_wilks_lambda
, signaltonoise
and threshold
.
The deprecated a
and reta
keywords have been removed from
scipy.stats.shapiro
.
The deprecated functions sparse.csgraph.cs_graph_components
and
sparse.linalg.symeig
have been removed from scipy.sparse
.
The following deprecated keywords have been removed in scipy.sparse.linalg
:
drop_tol
from splu
, and xtype
from bicg
, bicgstab
, cg
,
cgs
, gmres
, qmr
and minres
.
The deprecated functions expm2
and expm3
have been removed from
scipy.linalg
. The deprecated keyword q
was removed from
scipy.linalg.expm
. And the deprecated submodule linalg.calc_lwork
was
removed.
The deprecated functions C2K
, K2C
, F2C
, C2F
, F2K
and
K2F
have been removed from scipy.constants
.
The deprecated ppform
class was removed from scipy.interpolate
.
The deprecated keyword iprint
was removed from scipy.optimize.fmin_cobyla
.
The default value for the zero_phase
keyword of scipy.signal.decimate
has been changed to True.
The kmeans
and kmeans2
functions in scipy.cluster.vq
changed the
method used for random initialization, so using a fixed random seed will
not necessarily produce the same results as in previous versions.
scipy.special.gammaln
does not accept complex arguments anymore.
The deprecated functions sph_jn
, sph_yn
, sph_jnyn
, sph_in
,
sph_kn
, and sph_inkn
have been removed. Users should instead use
the functions spherical_jn
, spherical_yn
, spherical_in
, and
spherical_kn
. Be aware that the new functions have different
signatures.
The cross-class properties of scipy.signal.lti
systems have been removed.
The following properties/setters have been removed:
Name - (accessing/setting has been removed) - (setting has been removed)
- StateSpace - (
num
,den
,gain
) - (zeros
,poles
) - TransferFunction (
A
,B
,C
,D
,gain
) - (zeros
,poles
) - ZerosPolesGain (
A
,B
,C
,D
,num
,den
) - ()
signal.freqz(b, a)
with b
or a
>1-D raises a ValueError
. This
was a corner case for which it was unclear that the behavior ...
SciPy 0.19.1
SciPy 0.19.1 Release Notes
SciPy 0.19.1 is a bug-fix release with no new features compared to 0.19.0.
The most important change is a fix for a severe memory leak in integrate.quad
.
Authors
- Evgeni Burovski
- Patrick Callier +
- Yu Feng
- Ralf Gommers
- Ilhan Polat
- Eric Quintero
- Scott Sievert
- Pauli Virtanen
- Warren Weckesser
A total of 9 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 0.19.1
-
- gh-7214: Memory use in integrate.quad in scipy-0.19.0
-
- gh-7258:
linalg.matrix_balance
gives wrong transformation matrix
- gh-7258:
-
- gh-7262: Segfault in daily testing
-
- gh-7273:
scipy.interpolate._bspl.evaluate_spline
gets wrong type
- gh-7273:
-
- gh-7335: scipy.signal.dlti(A,B,C,D).freqresp() fails
Pull requests for 0.19.1
-
- gh-7211: BUG: convolve may yield inconsistent dtypes with method changed
-
- gh-7216: BUG: integrate: fix refcounting bug in quad()
-
- gh-7229: MAINT: special: Rewrite a test of wrightomega
-
- gh-7261: FIX: Corrected the transformation matrix permutation
-
- gh-7265: BUG: Fix broken axis handling in spectral functions
-
- gh-7266: FIX 7262: ckdtree crashes in query_knn.
-
- gh-7279: Upcast half- and single-precision floats to doubles in BSpline...
-
- gh-7336: BUG: Fix signal.dfreqresp for StateSpace systems
-
- gh-7419: Fix several issues in
sparse.load_npz
,save_npz
- gh-7419: Fix several issues in
-
- gh-7420: BUG: stats: allow integers as kappa4 shape parameters
SciPy 0.19.0
SciPy 0.19.0 Release Notes
SciPy 0.19.0 is the culmination of 7 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. Moreover, our development attention
will now shift to bug-fix releases on the 0.19.x branch, and on adding
new features on the master branch.
This release requires Python 2.7 or 3.4-3.6 and NumPy 1.8.2 or greater.
Highlights of this release include:
-
- A unified foreign function interface layer,
scipy.LowLevelCallable
.
- A unified foreign function interface layer,
-
- Cython API for scalar, typed versions of the universal functions from
thescipy.special
module, viacimport scipy.special.cython_special
.
- Cython API for scalar, typed versions of the universal functions from
New features
Foreign function interface improvements
scipy.LowLevelCallable
provides a new unified interface for wrapping
low-level compiled callback functions in the Python space. It supports
Cython imported "api" functions, ctypes function pointers, CFFI function
pointers, PyCapsules
, Numba jitted functions and more.
See gh-6509 <https://github.com/scipy/scipy/pull/6509>
_ for details.
scipy.linalg
improvements
The function scipy.linalg.solve
obtained two more keywords assume_a
and
transposed
. The underlying LAPACK routines are replaced with "expert"
versions and now can also be used to solve symmetric, hermitian and positive
definite coefficient matrices. Moreover, ill-conditioned matrices now cause
a warning to be emitted with the estimated condition number information. Old
sym_pos
keyword is kept for backwards compatibility reasons however it
is identical to using assume_a='pos'
. Moreover, the debug
keyword,
which had no function but only printing the overwrite_<a, b>
values, is
deprecated.
The function scipy.linalg.matrix_balance
was added to perform the so-called
matrix balancing using the LAPACK xGEBAL routine family. This can be used to
approximately equate the row and column norms through diagonal similarity
transformations.
The functions scipy.linalg.solve_continuous_are
and
scipy.linalg.solve_discrete_are
have numerically more stable algorithms.
These functions can also solve generalized algebraic matrix Riccati equations.
Moreover, both gained a balanced
keyword to turn balancing on and off.
scipy.spatial
improvements
scipy.spatial.SphericalVoronoi.sort_vertices_of_regions
has been re-written in
Cython to improve performance.
scipy.spatial.SphericalVoronoi
can handle > 200 k points (at least 10 million)
and has improved performance.
The function scipy.spatial.distance.directed_hausdorff
was
added to calculate the directed Hausdorff distance.
count_neighbors
method of scipy.spatial.cKDTree
gained an ability to
perform weighted pair counting via the new keywords weights
and
cumulative
. See gh-5647 <https://github.com/scipy/scipy/pull/5647>
_ for
details.
scipy.spatial.distance.pdist
and scipy.spatial.distance.cdist
now support
non-double custom metrics.
scipy.ndimage
improvements
The callback function C API supports PyCapsules in Python 2.7
Multidimensional filters now allow having different extrapolation modes for
different axes.
scipy.optimize
improvements
The scipy.optimize.basinhopping
global minimizer obtained a new keyword,
seed
, which can be used to seed the random number generator and obtain
repeatable minimizations.
The keyword sigma
in scipy.optimize.curve_fit
was overloaded to also accept
the covariance matrix of errors in the data.
scipy.signal
improvements
The function scipy.signal.correlate
and scipy.signal.convolve
have a new
optional parameter method
. The default value of auto
estimates the fastest
of two computation methods, the direct approach and the Fourier transform
approach.
A new function has been added to choose the convolution/correlation method,
scipy.signal.choose_conv_method
which may be appropriate if convolutions or
correlations are performed on many arrays of the same size.
New functions have been added to calculate complex short time fourier
transforms of an input signal, and to invert the transform to recover the
original signal: scipy.signal.stft
and scipy.signal.istft
. This
implementation also fixes the previously incorrect ouput of
scipy.signal.spectrogram
when complex output data were requested.
The function scipy.signal.sosfreqz
was added to compute the frequency
response from second-order sections.
The function scipy.signal.unit_impulse
was added to conveniently
generate an impulse function.
The function scipy.signal.iirnotch
was added to design second-order
IIR notch filters that can be used to remove a frequency component from
a signal. The dual function scipy.signal.iirpeak
was added to
compute the coefficients of a second-order IIR peak (resonant) filter.
The function scipy.signal.minimum_phase
was added to convert linear-phase
FIR filters to minimum phase.
The functions scipy.signal.upfirdn
and scipy.signal.resample_poly
are now
substantially faster when operating on some n-dimensional arrays when n > 1.
The largest reduction in computation time is realized in cases where the size
of the array is small (<1k samples or so) along the axis to be filtered.
scipy.fftpack
improvements
Fast Fourier transform routines now accept np.float16
inputs and upcast
them to np.float32
. Previously, they would raise an error.
scipy.cluster
improvements
Methods "centroid"
and "median"
of scipy.cluster.hierarchy.linkage
have been significantly sped up. Long-standing issues with using linkage
on
large input data (over 16 GB) have been resolved.
scipy.sparse
improvements
The functions scipy.sparse.save_npz
and scipy.sparse.load_npz
were added,
providing simple serialization for some sparse formats.
The prune
method of classes bsr_matrix
, csc_matrix
, and csr_matrix
was updated to reallocate backing arrays under certain conditions, reducing
memory usage.
The methods argmin
and argmax
were added to classes coo_matrix
,
csc_matrix
, csr_matrix
, and bsr_matrix
.
New function scipy.sparse.csgraph.structural_rank
computes the structural
rank of a graph with a given sparsity pattern.
New function scipy.sparse.linalg.spsolve_triangular
solves a sparse linear
system with a triangular left hand side matrix.
scipy.special
improvements
Scalar, typed versions of universal functions from scipy.special
are available
in the Cython space via cimport
from the new module
scipy.special.cython_special
. These scalar functions can be expected to be
significantly faster then the universal functions for scalar arguments. See
the scipy.special
tutorial for details.
Better control over special-function errors is offered by the
functions scipy.special.geterr
and scipy.special.seterr
and the
context manager scipy.special.errstate
.
The names of orthogonal polynomial root functions have been changed to
be consistent with other functions relating to orthogonal
polynomials. For example, scipy.special.j_roots
has been renamed
scipy.special.roots_jacobi
for consistency with the related
functions scipy.special.jacobi
and scipy.special.eval_jacobi
. To
preserve back-compatibility the old names have been left as aliases.
Wright Omega function is implemented as scipy.special.wrightomega
.
scipy.stats
improvements
The function scipy.stats.weightedtau
was added. It provides a weighted
version of Kendall's tau.
New class scipy.stats.multinomial
implements the multinomial distribution.
New class scipy.stats.rv_histogram
constructs a continuous univariate
distribution with a piecewise linear CDF from a binned data sample.
New class scipy.stats.argus
implements the Argus distribution.
scipy.interpolate
improvements
New class scipy.interpolate.BSpline
represents splines. BSpline
objects
contain knots and coefficients and can evaluate the spline. The format is
consistent with FITPACK, so that one can do, for example::
>>> t, c, k = splrep(x, y, s=0)
>>> spl = BSpline(t, c, k)
>>> np.allclose(spl(x), y)
spl*
functions, scipy.interpolate.splev
, scipy.interpolate.splint
,
scipy.interpolate.splder
and scipy.interpolate.splantider
, accept both
BSpline
objects and (t, c, k)
tuples for backwards compatibility.
For multidimensional splines, c.ndim > 1
, BSpline
objects are consistent
with piecewise polynomials, scipy.interpolate.PPoly
. This means that
BSpline
objects are not immediately consistent with
scipy.interpolate.splprep
, and one cannot do
>>> BSpline(*splprep([x, y])[0])
. Consult the scipy.interpolate
test suite
for examples of the precise equivalence.
In new code, prefer using scipy.interpolate.BSpline
objects instead of
manipulating (t, c, k)
tuples directly.
New function scipy.interpolate.make_interp_spline
constructs an interpolating
spline given data points and boundary conditions.
New function scipy.interpolate.make_lsq_spline
constructs a least-squares
spline approximation given data points.
scipy.integrate
improvements
Now scipy.integrate.fixed_quad
suppor...
Scipy 0.19.0 release candidate 2
This is the second release candidate for scipy 0.19.0. See https://github.com/scipy/scipy/blob/maintenance/0.19.x/doc/release/0.19.0-notes.rst for the release notes.
The main difference to rc1 is several Windows-specific issues that were fixed (Thanks Christoph!)
Please note that this is a source-only release. OS X and manylinux1 wheels will be produced for the final release.
If no issues are reported for this release, it will become the final 0.19.0 release. Issues can be reported via Github or on the scipy-dev mailing list (see http://scipy.org/scipylib/mailing-lists.html).
Scipy 0.19.0 release candidate 1
This is the first release candidate for scipy 0.19.0. See https://github.com/scipy/scipy/blob/maintenance/0.19.x/doc/release/0.19.0-notes.rst for the release notes.
Please note that this is a source-only release.
If no issues are reported for this release, it will become the final 0.19.0 release. Issues can be reported via Github or on the scipy-dev mailing list (see http://scipy.org/scipylib/mailing-lists.html).
SciPy 0.18.1
SciPy 0.18.1 Release Notes
SciPy 0.18.1 is a bug-fix release with no new features compared to 0.18.0.
Authors
- @kleskjr
- Evgeni Burovski
- CJ Carey
- Luca Citi +
- Yu Feng
- Ralf Gommers
- Johannes Schmitz +
- Josh Wilson
- Nathan Woods
A total of 9 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 0.18.1
- -
#6357 <https://github.com/scipy/scipy/issues/6357>
__: scipy 0.17.1 piecewise cubic hermite interpolation does not return... - -
#6420 <https://github.com/scipy/scipy/issues/6420>
__: circmean() changed behaviour from 0.17 to 0.18 - -
#6421 <https://github.com/scipy/scipy/issues/6421>
__: scipy.linalg.solve_banded overwrites input 'b' when the inversion... - -
#6425 <https://github.com/scipy/scipy/issues/6425>
__: cKDTree INF bug - -
#6435 <https://github.com/scipy/scipy/issues/6435>
__: scipy.stats.ks_2samp returns different values on different computers - -
#6458 <https://github.com/scipy/scipy/issues/6458>
__: Error in scipy.integrate.dblquad when using variable integration...
Pull requests for 0.18.1
- -
#6405 <https://github.com/scipy/scipy/pull/6405>
__: BUG: sparse: fix elementwise divide for CSR/CSC - -
#6431 <https://github.com/scipy/scipy/pull/6431>
__: BUG: result for insufficient neighbours from cKDTree is wrong. - -
#6432 <https://github.com/scipy/scipy/pull/6432>
__: BUG Issue #6421: scipy.linalg.solve_banded overwrites input 'b'... - -
#6455 <https://github.com/scipy/scipy/pull/6455>
__: DOC: add links to release notes - -
#6462 <https://github.com/scipy/scipy/pull/6462>
__: BUG: interpolate: fix .roots method of PchipInterpolator - -
#6492 <https://github.com/scipy/scipy/pull/6492>
__: BUG: Fix regression in dblquad: #6458 - -
#6543 <https://github.com/scipy/scipy/pull/6543>
__: fix the regression in circmean - -
#6545 <https://github.com/scipy/scipy/pull/6545>
__: Revert gh-5938, restore ks_2samp - -
#6557 <https://github.com/scipy/scipy/pull/6557>
__: Backports for 0.18.1
0.18.0 release tag for DOI
This is the same tag as v0.18.0, but re-issued to obtain a DOI.
The content and release notes can be found here: https://github.com/scipy/scipy/releases/tag/v0.18.0
Scipy 0.18.0
SciPy 0.18.0 Release Notes
SciPy 0.18.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. Moreover, our development attention
will now shift to bug-fix releases on the 0.19.x branch, and on adding
new features on the master branch.
This release requires Python 2.7 or 3.4-3.5 and NumPy 1.7.1 or greater.
Highlights of this release include:
- - A new ODE solver for two-point boundary value problems,
scipy.optimize.solve_bvp
. - - A new class,
CubicSpline
, for cubic spline interpolation of data. - - N-dimensional tensor product polynomials,
scipy.interpolate.NdPPoly
. - - Spherical Voronoi diagrams,
scipy.spatial.SphericalVoronoi
. - - Support for discrete-time linear systems,
scipy.signal.dlti
.
New features
scipy.integrate
improvements
A solver of two-point boundary value problems for ODE systems has been
implemented in scipy.integrate.solve_bvp
. The solver allows for non-separated
boundary conditions, unknown parameters and certain singular terms. It finds
a C1 continious solution using a fourth-order collocation algorithm.
scipy.interpolate
improvements
Cubic spline interpolation is now available via scipy.interpolate.CubicSpline
.
This class represents a piecewise cubic polynomial passing through given points
and C2 continuous. It is represented in the standard polynomial basis on each
segment.
A representation of n-dimensional tensor product piecewise polynomials is
available as the scipy.interpolate.NdPPoly
class.
Univariate piecewise polynomial classes, PPoly
and Bpoly
, can now be
evaluated on periodic domains. Use extrapolate="periodic"
keyword
argument for this.
scipy.fftpack
improvements
scipy.fftpack.next_fast_len
function computes the next "regular" number for
FFTPACK. Padding the input to this length can give significant performance
increase for scipy.fftpack.fft
.
scipy.signal
improvements
Resampling using polyphase filtering has been implemented in the function
scipy.signal.resample_poly
. This method upsamples a signal, applies a
zero-phase low-pass FIR filter, and downsamples using scipy.signal.upfirdn
(which is also new in 0.18.0). This method can be faster than FFT-based
filtering provided by scipy.signal.resample
for some signals.
scipy.signal.firls
, which constructs FIR filters using least-squares error
minimization, was added.
scipy.signal.sosfiltfilt
, which does forward-backward filtering like
scipy.signal.filtfilt
but for second-order sections, was added.
Discrete-time linear systems
`scipy.signal.dlti` provides an implementation of discrete-time linear systems.
Accordingly, the `StateSpace`, `TransferFunction` and `ZerosPolesGain` classes
have learned a the new keyword, `dt`, which can be used to create discrete-time
instances of the corresponding system representation.
`scipy.sparse` improvements
- ---------------------------
The functions `sum`, `max`, `mean`, `min`, `transpose`, and `reshape` in
`scipy.sparse` have had their signatures augmented with additional arguments
and functionality so as to improve compatibility with analogously defined
functions in `numpy`.
Sparse matrices now have a `count_nonzero` method, which counts the number of
nonzero elements in the matrix. Unlike `getnnz()` and ``nnz`` propety,
which return the number of stored entries (the length of the data attribute),
this method counts the actual number of non-zero entries in data.
`scipy.optimize` improvements
- -----------------------------
The implementation of Nelder-Mead minimization,
`scipy.minimize(..., method="Nelder-Mead")`, obtained a new keyword,
`initial_simplex`, which can be used to specify the initial simplex for the
optimization process.
Initial step size selection in CG and BFGS minimizers has been improved. We
expect that this change will improve numeric stability of optimization in some
cases. See pull request gh-5536 for details.
Handling of infinite bounds in SLSQP optimization has been improved. We expect
that this change will improve numeric stability of optimization in the some
cases. See pull request gh-6024 for details.
A large suite of global optimization benchmarks has been added to
``scipy/benchmarks/go_benchmark_functions``. See pull request gh-4191 for details.
Nelder-Mead and Powell minimization will now only set defaults for
maximum iterations or function evaluations if neither limit is set by
the caller. In some cases with a slow converging function and only 1
limit set, the minimization may continue for longer than with previous
versions and so is more likely to reach convergence. See issue gh-5966.
`scipy.stats` improvements
- --------------------------
Trapezoidal distribution has been implemented as `scipy.stats.trapz`.
Skew normal distribution has been implemented as `scipy.stats.skewnorm`.
Burr type XII distribution has been implemented as `scipy.stats.burr12`.
Three- and four-parameter kappa distributions have been implemented as
`scipy.stats.kappa3` and `scipy.stats.kappa4`, respectively.
New `scipy.stats.iqr` function computes the interquartile region of a
distribution.
Random matrices
scipy.stats.special_ortho_group
and scipy.stats.ortho_group
provide
generators of random matrices in the SO(N) and O(N) groups, respectively. They
generate matrices in the Haar distribution, the only uniform distribution on
these group manifolds.
scipy.stats.random_correlation
provides a generator for random
correlation matrices, given specified eigenvalues.
scipy.linalg
improvements
scipy.linalg.svd
gained a new keyword argument, lapack_driver
. Available
drivers are gesdd
(default) and gesvd
.
scipy.linalg.lapack.ilaver
returns the version of the LAPACK library SciPy
links to.
scipy.spatial
improvements
Boolean distances, scipy.spatial.pdist
, have been sped up. Improvements vary
by the function and the input size. In many cases, one can expect a speed-up
of x2--x10.
New class scipy.spatial.SphericalVoronoi
constructs Voronoi diagrams on the
surface of a sphere. See pull request gh-5232 for details.
scipy.cluster
improvements
A new clustering algorithm, the nearest neighbor chain algorithm, has been
implemented for scipy.cluster.hierarchy.linkage
. As a result, one can expect
a significant algorithmic improvement (:math:O(N^2)
instead of :math:O(N^3)
)
for several linkage methods.
scipy.special
improvements
The new function scipy.special.loggamma
computes the principal branch of the
logarithm of the Gamma function. For real input, loggamma
is compatible
with scipy.special.gammaln
. For complex input, it has more consistent
behavior in the complex plane and should be preferred over gammaln
.
Vectorized forms of spherical Bessel functions have been implemented as
scipy.special.spherical_jn
, scipy.special.spherical_kn
,
scipy.special.spherical_in
and scipy.special.spherical_yn
.
They are recommended for use over sph_*
functions, which are now deprecated.
Several special functions have been extended to the complex domain and/or
have seen domain/stability improvements. This includes spence
, digamma
,
log1p
and several others.
Deprecated features
The cross-class properties of lti
systems have been deprecated. The
following properties/setters will raise a DeprecationWarning
:
Name - (accessing/setting raises warning) - (setting raises warning)
- StateSpace - (
num
,den
,gain
) - (zeros
,poles
) - TransferFunction (
A
,B
,C
,D
,gain
) - (zeros
,poles
) - ZerosPolesGain (
A
,B
,C
,D
,num
,den
) - ()
Spherical Bessel functions, sph_in
, sph_jn
, sph_kn
, sph_yn
,
sph_jnyn
and sph_inkn
have been deprecated in favor of
scipy.special.spherical_jn
and spherical_kn
, spherical_yn
,
spherical_in
.
The following functions in scipy.constants
are deprecated: C2K
, K2C
,
C2F
, F2C
, F2K
and K2F
. They are superceded by a new function
scipy.constants.convert_temperature
that can perform all those conversions
plus to/from the Rankine temperature scale.
Backwards incompatible changes
scipy.optimize
The convergence criterion for optimize.bisect
,
optimize.brentq
, optimize.brenth
, and optimize.ridder
now
works the same as numpy.allclose
.
scipy.ndimage
The offset in ndimage.iterpolation.affine_transform
is now consistently added after the matrix is applied,
independent of if the matrix is specified using a one-dimensional
or a two-dimensional array.
scipy.stats
stats.ks_2samp
used to return nonsensical values if the input was
not real or contained nans. It now raises an exception for such inputs.
Several deprecated methods of scipy.stats
distributions have been removed:
est_loc_scale
, vecfunc
, veccdf
and vec_generic_moment
.
Deprecated functions nanmean
, nanstd
and nanmedian
have been removed
from scipy.stats
. These functions were deprecated in scipy 0.15.0 in favor
of their numpy
equivalents.
A bug in the rvs()
method of the distributions in scipy.stats
has
been fixed. When arguments to rvs()
were given that were shaped for
broadcasting, in many cases the returned random samples were not random.
A simple example of the problem is stats.norm.rvs(loc=np.zeros(10))
.
Because of the bug, that call would return 10 identical values. The bug
only affected code that relied on the broadcasting of the shape, location
and scale parameters.
The rvs()
method also accepted some arguments that it should not have.
There is a potential for backwards incompatibility in cases where rvs()
accepted arguments that are not, in fact, compatible with broadcasting.
An example is
stats....
release candidate 2 for scipy 0.18.0
This is the second rc for scipy 0.18.0.
Please test it --- both the release itself on your machines and your code against this release --- and report breakage (hopefully, there isn't one) on Github issue tracker or scipy-dev mailing list.
If no issues are reported for this rc, it will graduate into the final release.
0.18.0 release candidate 1
This is the first release candidate for scipy 0.18.0. See https://github.com/scipy/scipy/blob/maintenance/0.18.x/doc/release/0.18.0-notes.rst for the release notes.
Please note that this is a source-only release.
If no issues are reported for this release, it will become the final 0.18.0 release. Issues can be reported via Github or on the scipy-dev mailing list (see http://scipy.org/scipylib/mailing-lists.html).