Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP: extend some announced deprecations due to out-of-band 1.13 release #19892

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion scipy/_lib/deprecation.py
Expand Up @@ -58,7 +58,7 @@ def _sub_module_deprecation(*, sub_package, module, private_modules, all,
f"`scipy.{sub_package}.{module}.{attribute}` is deprecated along with "
f"the `scipy.{sub_package}.{module}` namespace. "
f"`scipy.{sub_package}.{module}.{attribute}` will be removed "
f"in SciPy 1.13.0, and the `scipy.{sub_package}.{module}` namespace "
f"in SciPy 1.14.0, and the `scipy.{sub_package}.{module}` namespace "
f"will be removed in SciPy 2.0.0."
)

Expand Down
20 changes: 10 additions & 10 deletions scipy/integrate/_quadrature.py
Expand Up @@ -315,17 +315,17 @@ def vfunc(x):


@_deprecated("`scipy.integrate.quadrature` is deprecated as of SciPy 1.12.0"
"and will be removed in SciPy 1.14.0. Please use"
"and will be removed in SciPy 1.15.0. Please use"
"`scipy.integrate.quad` instead.")
def quadrature(func, a, b, args=(), tol=1.49e-8, rtol=1.49e-8, maxiter=50,
vec_func=True, miniter=1):
"""
Compute a definite integral using fixed-tolerance Gaussian quadrature.

.. deprecated:: 1.12.0

This function is deprecated as of SciPy 1.12.0 and will be removed
in SciPy 1.14.0. Please use `scipy.integrate.quad` instead.

Compute a definite integral using fixed-tolerance Gaussian quadrature.
in SciPy 1.15.0. Please use `scipy.integrate.quad` instead.

Integrate `func` from `a` to `b` using Gaussian quadrature
with absolute tolerance `tol`.
Expand Down Expand Up @@ -451,7 +451,7 @@ def cumulative_trapezoid(y, x=None, dx=1.0, axis=-1, initial=None):

.. deprecated:: 1.12.0
The option for non-zero inputs for `initial` will be deprecated in
SciPy 1.14.0. After this time, a ValueError will be raised if
SciPy 1.15.0. After this time, a ValueError will be raised if
`initial` is not None or 0.

Returns
Expand Down Expand Up @@ -522,7 +522,7 @@ def cumulative_trapezoid(y, x=None, dx=1.0, axis=-1, initial=None):
warnings.warn(
"The option for values for `initial` other than None or 0 is "
"deprecated as of SciPy 1.12.0 and will raise a value error in"
" SciPy 1.14.0.",
" SciPy 1.15.0.",
DeprecationWarning, stacklevel=2
)
if not np.isscalar(initial):
Expand Down Expand Up @@ -1273,17 +1273,17 @@ def _printresmat(function, interval, resmat):


@_deprecated("`scipy.integrate.romberg` is deprecated as of SciPy 1.12.0"
"and will be removed in SciPy 1.14.0. Please use"
"and will be removed in SciPy 1.15.0. Please use"
"`scipy.integrate.quad` instead.")
def romberg(function, a, b, args=(), tol=1.48e-8, rtol=1.48e-8, show=False,
divmax=10, vec_func=False):
"""
Romberg integration of a callable function or method.

.. deprecated:: 1.12.0

This function is deprecated as of SciPy 1.12.0 and will be removed
in SciPy 1.14.0. Please use `scipy.integrate.quad` instead.

Romberg integration of a callable function or method.
in SciPy 1.15.0. Please use `scipy.integrate.quad` instead.

Returns the integral of `function` (a function of one variable)
over the interval (`a`, `b`).
Expand Down
4 changes: 2 additions & 2 deletions scipy/interpolate/_interpolate.py
Expand Up @@ -93,7 +93,7 @@ def lagrange(x, w):


dep_mesg = """\
`interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy 1.13.0.
`interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy 1.14.0.

For legacy code, nearly bug-for-bug compatible replacements are
`RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
Expand All @@ -115,7 +115,7 @@ class interp2d:
.. deprecated:: 1.10.0

`interp2d` is deprecated in SciPy 1.10 and will be removed in SciPy
1.13.0.
1.14.0.

For legacy code, nearly bug-for-bug compatible replacements are
`RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
Expand Down
8 changes: 4 additions & 4 deletions scipy/signal/_signaltools.py
Expand Up @@ -1498,7 +1498,7 @@ def order_filter(a, domain, rank):
a = np.asarray(a)
if a.dtype in [object, 'float128']:
mesg = (f"Using order_filter with arrays of dtype {a.dtype} is "
f"deprecated in SciPy 1.11 and will be removed in SciPy 1.13")
f"deprecated in SciPy 1.11 and will be removed in SciPy 1.14")
warnings.warn(mesg, DeprecationWarning, stacklevel=2)

result = _sigtools._order_filterND(a, domain, rank)
Expand Down Expand Up @@ -1576,7 +1576,7 @@ def medfilt(volume, kernel_size=None):

if volume.dtype.char in ['O', 'g']:
mesg = (f"Using medfilt with arrays of dtype {volume.dtype} is "
f"deprecated in SciPy 1.11 and will be removed in SciPy 1.13")
f"deprecated in SciPy 1.11 and will be removed in SciPy 1.14")
warnings.warn(mesg, DeprecationWarning, stacklevel=2)

result = _sigtools._order_filterND(volume, domain, order)
Expand Down Expand Up @@ -2463,8 +2463,8 @@ def hilbert2(x, N=None):
return x


_msg_cplx_sort="""cmplx_sort is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. The exact equivalent for a numpy array argument is
_msg_cplx_sort="""cmplx_sort was deprecated in SciPy 1.12 and will be removed
in SciPy 1.15. The exact equivalent for a numpy array argument is
>>> def cmplx_sort(p):
... idx = np.argsort(abs(p))
... return np.take(p, idx, 0), idx
Expand Down
49 changes: 22 additions & 27 deletions scipy/signal/_wavelets.py
Expand Up @@ -9,18 +9,18 @@


_msg="""scipy.signal.%s is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. We recommend using PyWavelets instead.
in SciPy 1.15. We recommend using PyWavelets instead.
"""


def daub(p):
"""
The coefficients for the FIR low-pass filter producing Daubechies wavelets.

.. deprecated:: 1.12.0

scipy.signal.daub is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. We recommend using PyWavelets instead.

The coefficients for the FIR low-pass filter producing Daubechies wavelets.
in SciPy 1.15. We recommend using PyWavelets instead.

p>=1 gives the order of the zero at f=1/2.
There are 2p filter coefficients.
Expand Down Expand Up @@ -91,13 +91,12 @@ def daub(p):

def qmf(hk):
"""
Return high-pass qmf filter from low-pass

.. deprecated:: 1.12.0

scipy.signal.qmf is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. We recommend using PyWavelets instead.


Return high-pass qmf filter from low-pass
in SciPy 1.15. We recommend using PyWavelets instead.

Parameters
----------
Expand All @@ -119,13 +118,12 @@ def qmf(hk):

def cascade(hk, J=7):
"""
Return (x, phi, psi) at dyadic points ``K/2**J`` from filter coefficients.

.. deprecated:: 1.12.0

scipy.signal.cascade is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. We recommend using PyWavelets instead.


Return (x, phi, psi) at dyadic points ``K/2**J`` from filter coefficients.
in SciPy 1.15. We recommend using PyWavelets instead.

Parameters
----------
Expand Down Expand Up @@ -233,12 +231,12 @@ def cascade(hk, J=7):

def morlet(M, w=5.0, s=1.0, complete=True):
"""
Complex Morlet wavelet.

.. deprecated:: 1.12.0

scipy.signal.morlet is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. We recommend using PyWavelets instead.

Complex Morlet wavelet.
in SciPy 1.15. We recommend using PyWavelets instead.

Parameters
----------
Expand Down Expand Up @@ -317,13 +315,12 @@ def morlet(M, w=5.0, s=1.0, complete=True):

def ricker(points, a):
"""
Return a Ricker wavelet, also known as the "Mexican hat wavelet".

.. deprecated:: 1.12.0

scipy.signal.ricker is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. We recommend using PyWavelets instead.


Return a Ricker wavelet, also known as the "Mexican hat wavelet".
in SciPy 1.15. We recommend using PyWavelets instead.

It models the function:

Expand Down Expand Up @@ -375,13 +372,12 @@ def _ricker(points, a):

def morlet2(M, s, w=5):
"""
Complex Morlet wavelet, designed to work with `cwt`.

.. deprecated:: 1.12.0

scipy.signal.morlet2 is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. We recommend using PyWavelets instead.


Complex Morlet wavelet, designed to work with `cwt`.
in SciPy 1.15. We recommend using PyWavelets instead.

Returns the complete version of morlet wavelet, normalised
according to `s`::
Expand Down Expand Up @@ -462,13 +458,12 @@ def morlet2(M, s, w=5):

def cwt(data, wavelet, widths, dtype=None, **kwargs):
"""
Continuous wavelet transform.

.. deprecated:: 1.12.0

scipy.signal.cwt is deprecated in SciPy 1.12 and will be removed
in SciPy 1.14. We recommend using PyWavelets instead.


Continuous wavelet transform.
in SciPy 1.15. We recommend using PyWavelets instead.

Performs a continuous wavelet transform on `data`,
using the `wavelet` function. A CWT performs a convolution
Expand Down