diff --git a/news/resample-dep.rst b/news/resample-dep.rst new file mode 100644 index 00000000..91bb3e3e --- /dev/null +++ b/news/resample-dep.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* `resample` function in resampler. Replaced with `wsinterp` with better functionality. + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/utils/resampler.py b/src/diffpy/utils/resampler.py index 5f6062d2..07f915f9 100644 --- a/src/diffpy/utils/resampler.py +++ b/src/diffpy/utils/resampler.py @@ -15,6 +15,8 @@ """Various utilities related to data parsing and manipulation.""" +import warnings + import numpy as np @@ -97,6 +99,13 @@ def resample(r, s, dr): Returns resampled (r, s). """ + warnings.warn( + "The 'resample' function is deprecated and will be removed in a future release (3.8.0). \n" + "'resample' has been renamed 'wsinterp' to better reflect functionality. Please use 'wsinterp' instead.", + DeprecationWarning, + stacklevel=2, + ) + dr0 = r[1] - r[0] # Constant timestep if dr0 < dr: