From fa4f6156543f6df1fbfb1b232e4aed18f65b1eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Meyer-Conde=E3=80=80=E3=80=80=E3=80=80=20=20?= =?UTF-8?q?=E3=83=A1=E3=82=A4=E3=83=A4=E3=83=BC=E3=83=9E=E3=82=B3=E3=83=88?= <37673095+meiyasan@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:25:05 +0900 Subject: [PATCH 1/2] update deprecation message with backward compatibility information --- pywt/_extensions/_pywt.pyx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pywt/_extensions/_pywt.pyx b/pywt/_extensions/_pywt.pyx index fe448ca2d..6a5a41d75 100644 --- a/pywt/_extensions/_pywt.pyx +++ b/pywt/_extensions/_pywt.pyx @@ -705,17 +705,28 @@ cdef public class ContinuousWavelet [type ContinuousWaveletType, object Continuo msg = ( "Wavelets of family {0}, without parameters " "specified in the name are deprecated. The name " - "should take the form {0}M-B-C where M is the spline " + "should follow the format {0}M-B-C where M is the spline " "order and B, C are floats representing the bandwidth " "frequency and center frequency, respectively " - "(example: {0}1-1.5-1.0).").format(base_name) + "(example, for backward compatibility: " + "{0} = {0}2-1.0-0.5).").format(base_name) + elif base_name == 'shan': + msg = ( + "Wavelets from the family {0}, without parameters " + "specified in the name are deprecated. The name " + "should follow the format {0}B-C, where B and C are floats" + "representing the bandwidth frequency and center " + "frequency, respectively (example, for backward " + "compatibility: {0} = {0}0.5-1.0)." + ).format(base_name) else: msg = ( "Wavelets from the family {0}, without parameters " "specified in the name are deprecated. The name " - "should takethe form {0}B-C where B and C are floats " + "should follow the format {0}B-C, where B and C are floats" "representing the bandwidth frequency and center " - "frequency, respectively (example: {0}1.5-1.0)." + "frequency, respectively (example, for backward " + "compatibility: {0} = {0}1.0-0.5)." ).format(base_name) warnings.warn(msg, FutureWarning) else: From 2722720abbbaf00a8324466490e79fce16a38cee Mon Sep 17 00:00:00 2001 From: Ralf Gommers Date: Fri, 22 Nov 2024 10:52:00 +0100 Subject: [PATCH 2/2] Fix a few missing spaces Co-authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> --- pywt/_extensions/_pywt.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pywt/_extensions/_pywt.pyx b/pywt/_extensions/_pywt.pyx index 6a5a41d75..3ffe41359 100644 --- a/pywt/_extensions/_pywt.pyx +++ b/pywt/_extensions/_pywt.pyx @@ -714,7 +714,7 @@ cdef public class ContinuousWavelet [type ContinuousWaveletType, object Continuo msg = ( "Wavelets from the family {0}, without parameters " "specified in the name are deprecated. The name " - "should follow the format {0}B-C, where B and C are floats" + "should follow the format {0}B-C, where B and C are floats " "representing the bandwidth frequency and center " "frequency, respectively (example, for backward " "compatibility: {0} = {0}0.5-1.0)." @@ -723,7 +723,7 @@ cdef public class ContinuousWavelet [type ContinuousWaveletType, object Continuo msg = ( "Wavelets from the family {0}, without parameters " "specified in the name are deprecated. The name " - "should follow the format {0}B-C, where B and C are floats" + "should follow the format {0}B-C, where B and C are floats " "representing the bandwidth frequency and center " "frequency, respectively (example, for backward " "compatibility: {0} = {0}1.0-0.5)."