Update dependency scipy to v0.19.1 #156
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
==0.17.1
->==0.19.1
Release Notes
scipy/scipy
v0.19.1
Compare Source
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
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
linalg.matrix_balance
gives wrong transformation matrixscipy.interpolate._bspl.evaluate_spline
gets wrong typePull requests for 0.19.1
sparse.load_npz
,save_npz
v0.19.0
Compare Source
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:
scipy.LowLevelCallable
.the
scipy.special
module, viacimport scipy.special.cython_special
.New features
Foreign function interface improvements
scipy.LowLevelCallable
provides a new unified interface for wrappinglow-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
improvementsThe function
scipy.linalg.solve
obtained two more keywordsassume_a
andtransposed
. 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 itis identical to using
assume_a='pos'
. Moreover, thedebug
keyword,which had no function but only printing the
overwrite_<a, b>
values, isdeprecated.
The function
scipy.linalg.matrix_balance
was added to perform the so-calledmatrix 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
andscipy.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
improvementsscipy.spatial.SphericalVoronoi.sort_vertices_of_regions
has been re-written inCython 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
wasadded to calculate the directed Hausdorff distance.
count_neighbors
method ofscipy.spatial.cKDTree
gained an ability toperform weighted pair counting via the new keywords
weights
andcumulative
. Seegh-5647 <https://github.com/scipy/scipy/pull/5647>
_ fordetails.
scipy.spatial.distance.pdist
andscipy.spatial.distance.cdist
now supportnon-double custom metrics.
scipy.ndimage
improvementsThe callback function C API supports PyCapsules in Python 2.7
Multidimensional filters now allow having different extrapolation modes for
different axes.
scipy.optimize
improvementsThe
scipy.optimize.basinhopping
global minimizer obtained a new keyword,seed
, which can be used to seed the random number generator and obtainrepeatable minimizations.
The keyword
sigma
inscipy.optimize.curve_fit
was overloaded to also acceptthe covariance matrix of errors in the data.
scipy.signal
improvementsThe function
scipy.signal.correlate
andscipy.signal.convolve
have a newoptional parameter
method
. The default value ofauto
estimates the fastestof 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 orcorrelations 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
andscipy.signal.istft
. Thisimplementation 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 frequencyresponse from second-order sections.
The function
scipy.signal.unit_impulse
was added to convenientlygenerate an impulse function.
The function
scipy.signal.iirnotch
was added to design second-orderIIR notch filters that can be used to remove a frequency component from
a signal. The dual function
scipy.signal.iirpeak
was added tocompute the coefficients of a second-order IIR peak (resonant) filter.
The function
scipy.signal.minimum_phase
was added to convert linear-phaseFIR filters to minimum phase.
The functions
scipy.signal.upfirdn
andscipy.signal.resample_poly
are nowsubstantially 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
improvementsFast Fourier transform routines now accept
np.float16
inputs and upcastthem to
np.float32
. Previously, they would raise an error.scipy.cluster
improvementsMethods
"centroid"
and"median"
ofscipy.cluster.hierarchy.linkage
have been significantly sped up. Long-standing issues with using
linkage
onlarge input data (over 16 GB) have been resolved.
scipy.sparse
improvementsThe functions
scipy.sparse.save_npz
andscipy.sparse.load_npz
were added,providing simple serialization for some sparse formats.
The
prune
method of classesbsr_matrix
,csc_matrix
, andcsr_matrix
was updated to reallocate backing arrays under certain conditions, reducing
memory usage.
The methods
argmin
andargmax
were added to classescoo_matrix
,csc_matrix
,csr_matrix
, andbsr_matrix
.New function
scipy.sparse.csgraph.structural_rank
computes the structuralrank of a graph with a given sparsity pattern.
New function
scipy.sparse.linalg.spsolve_triangular
solves a sparse linearsystem with a triangular left hand side matrix.
scipy.special
improvementsScalar, typed versions of universal functions from
scipy.special
are availablein the Cython space via
cimport
from the new modulescipy.special.cython_special
. These scalar functions can be expected to besignificantly 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
andscipy.special.seterr
and thecontext 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 renamedscipy.special.roots_jacobi
for consistency with the relatedfunctions
scipy.special.jacobi
andscipy.special.eval_jacobi
. Topreserve back-compatibility the old names have been left as aliases.
Wright Omega function is implemented as
scipy.special.wrightomega
.scipy.stats
improvementsThe function
scipy.stats.weightedtau
was added. It provides a weightedversion of Kendall's tau.
New class
scipy.stats.multinomial
implements the multinomial distribution.New class
scipy.stats.rv_histogram
constructs a continuous univariatedistribution with a piecewise linear CDF from a binned data sample.
New class
scipy.stats.argus
implements the Argus distribution.scipy.interpolate
improvementsNew class
scipy.interpolate.BSpline
represents splines.BSpline
objectscontain knots and coefficients and can evaluate the spline. The format is
consistent with FITPACK, so that one can do, for example::
spl*
functions,scipy.interpolate.splev
,scipy.interpolate.splint
,scipy.interpolate.splder
andscipy.interpolate.splantider
, accept bothBSpline
objects and(t, c, k)
tuples for backwards compatibility.For multidimensional splines,
c.ndim > 1
,BSpline
objects are consistentwith piecewise polynomials,
scipy.interpolate.PPoly
. This means thatBSpline
objects are not immediately consistent withscipy.interpolate.splprep
, and one cannot do>>> BSpline(*splprep([x, y])[0])
. Consult thescipy.interpolate
test suitefor examples of the precise equivalence.
In new code, prefer using
scipy.interpolate.BSpline
objects instead ofmanipulating
(t, c, k)
tuples directly.New function
scipy.interpolate.make_interp_spline
constructs an interpolatingspline given data points and boundary conditions.
New function
scipy.interpolate.make_lsq_spline
constructs a least-squaresspline approximation given data points.
scipy.integrate
improvementsNow
scipy.integrate.fixed_quad
supports vector-valued functions.Deprecated features
scipy.interpolate.splmake
,scipy.interpolate.spleval
andscipy.interpolate.spline
are deprecated. The format used bysplmake/spleval
was inconsistent with
splrep/splev
which was confusing to users.scipy.special.errprint
is deprecated. Improved functionality isavailable in
scipy.special.seterr
.calling
scipy.spatial.distance.pdist
orscipy.spatial.distance.cdist
witharguments not needed by the chosen metric is deprecated. Also, metrics
"old_cosine"
and"old_cos"
are deprecated.Backwards incompatible changes
The deprecated
scipy.weave
submodule was removed.scipy.spatial.distance.squareform
now returns arrays of the same dtype asthe input, instead of always float64.
scipy.special.errprint
now returns a boolean.The function
scipy.signal.find_peaks_cwt
now returns an array instead ofa list.
scipy.stats.kendalltau
now computes the correct p-value in case theinput contains ties. The p-value is also identical to that computed by
scipy.stats.mstats.kendalltau
and by R. If the input does notcontain ties there is no change w.r.t. the previous implementation.
The function
scipy.linalg.block_diag
will not ignore zero-sized matrices anymore.Instead it will insert rows or columns of zeros of the appropriate size.
See gh-4908 for more details.
Other changes
SciPy wheels will now report their dependency on
numpy
on all platforms.This change was made because Numpy wheels are available, and because the pip
upgrade behavior is finally changing for the better (use
--upgrade-strategy=only-if-needed
forpip >= 8.2
; that behavior willbecome the default in the next major version of
pip
).Numerical values returned by
scipy.interpolate.interp1d
withkind="cubic"
and
"quadratic"
may change relative to previous scipy versions. If yourcode depended on specific numeric values (i.e., on implementation
details of the interpolators), you may want to double-check your results.
Authors
A total of 121 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.
v0.18.1
Compare Source
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
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.1v0.18.0
Compare Source
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:
scipy.optimize.solve_bvp
.CubicSpline
, for cubic spline interpolation of data.scipy.interpolate.NdPPoly
.scipy.spatial.SphericalVoronoi
.scipy.signal.dlti
.New features
scipy.integrate
improvementsA solver of two-point boundary value problems for ODE systems has been
implemented in
scipy.integrate.solve_bvp
. The solver allows for non-separatedboundary conditions, unknown parameters and certain singular terms. It finds
a C1 continious solution using a fourth-order collocation algorithm.
scipy.interpolate
improvementsCubic 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
andBpoly
, can now beevaluated on periodic domains. Use
extrapolate="periodic"
keywordargument for this.
scipy.fftpack
improvementsscipy.fftpack.next_fast_len
function computes the next "regular" number forFFTPACK. Padding the input to this length can give significant performance
increase for
scipy.fftpack.fft
.scipy.signal
improvementsResampling using polyphase filtering has been implemented in the function
scipy.signal.resample_poly
. This method upsamples a signal, applies azero-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 errorminimization, was added.
scipy.signal.sosfiltfilt
, which does forward-backward filtering likescipy.signal.filtfilt
but for second-order sections, was added.Discrete-time linear systems
scipy.stats.special_ortho_group
andscipy.stats.ortho_group
providegenerators 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 randomcorrelation matrices, given specified eigenvalues.
scipy.linalg
improvementsscipy.linalg.svd
gained a new keyword argument,lapack_driver
. Availabledrivers are
gesdd
(default) andgesvd
.scipy.linalg.lapack.ilaver
returns the version of the LAPACK library SciPylinks to.
scipy.spatial
improvementsBoolean distances,
scipy.spatial.pdist
, have been sped up. Improvements varyby 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 thesurface of a sphere. See pull request gh-5232 for details.
scipy.cluster
improvementsA new clustering algorithm, the nearest neighbor chain algorithm, has been
implemented for
scipy.cluster.hierarchy.linkage
. As a result, one can expecta significant algorithmic improvement (:math:
O(N^2)
instead of :math:O(N^3)
)for several linkage methods.
scipy.special
improvementsThe new function
scipy.special.loggamma
computes the principal branch of thelogarithm of the Gamma function. For real input,
loggamma
is compatiblewith
scipy.special.gammaln
. For complex input, it has more consistentbehavior 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
andscipy.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. Thefollowing properties/setters will raise a
DeprecationWarning
:Name - (accessing/setting raises warning) - (setting raises warning)
num
,den
,gain
) - (zeros
,poles
)A
,B
,C
,D
,gain
) - (zeros
,poles
)A
,B
,C
,D
,num
,den
) - ()Spherical Bessel functions,
sph_in
,sph_jn
,sph_kn
,sph_yn
,sph_jnyn
andsph_inkn
have been deprecated in favor ofscipy.special.spherical_jn
andspherical_kn
,spherical_yn
,spherical_in
.The following functions in
scipy.constants
are deprecated:C2K
,K2C
,C2F
,F2C
,F2K
andK2F
. They are superceded by a new functionscipy.constants.convert_temperature
that can perform all those conversionsplus to/from the Rankine temperature scale.
Backwards incompatible changes
scipy.optimize
The convergence criterion for
optimize.bisect
,optimize.brentq
,optimize.brenth
, andoptimize.ridder
nowworks 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 wasnot 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
andvec_generic_moment
.Deprecated functions
nanmean
,nanstd
andnanmedian
have been removedfrom
scipy.stats
. These functions were deprecated in scipy 0.15.0 in favorof their
numpy
equivalents.A bug in the
rvs()
method of the distributions inscipy.stats
hasbeen fixed. When arguments to
rvs()
were given that were shaped forbroadcasting, 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
The shape of the first argument is not compatible with the requested size,
but the function still returned an array with shape (2, 2). In scipy 0.18,
that call generates a
ValueError
.scipy.io
scipy.io.netcdf
masking now gives precedence to the_FillValue
attributeover the
missing_value
attribute, if both are given. Also, data are onlytreated as missing if they match one of these attributes exactly: values that
differ by roundoff from
_FillValue
ormissing_value
are no longertreated as missing values.
scipy.interpolate
scipy.interpolate.PiecewisePolynomial
class has been removed. It has beendeprecated in scipy 0.14.0, and
scipy.interpolate.BPoly.from_derivatives
servesas a drop-in replacement.
Other changes
Scipy now uses
setuptools
for its builds instead of plain distutils. Thisfixes usage of
install_requires='scipy'
in thesetup.py
files ofprojects that depend on Scipy (see Numpy issue gh-6551 for details). It
potentially affects the way that build/install methods for Scipy itself behave
though. Please report any unexpected behavior on the Scipy issue tracker.
PR
#​6240 <https://github.com/scipy/scipy/pull/6240>
__changes the interpretation of the
maxfun
option inL-BFGS-B
based routinesin the
scipy.optimize
module.An
L-BFGS-B
search consists of multiple iterations,with each iteration consisting of one or more function evaluations.
Whereas the old search strategy terminated immediately upon reaching
maxfun
function evaluations, the new strategy allows the current iteration
to finish despite reaching
maxfun
.The bundled copy of Qhull in the
scipy.spatial
subpackage has been upgraded toversion 2015.2.
The bundled copy of ARPACK in the
scipy.sparse.linalg
subpackage has beenupgraded to arpack-ng 3.3.0.
The bundled copy of SuperLU in the
scipy.sparse
subpackage has been upgradedto version 5.1.1.
Authors
A total of 99 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.
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.