diff --git a/news/resample-dep-warning.rst b/news/resample-dep-warning.rst new file mode 100644 index 00000000..186e3c19 --- /dev/null +++ b/news/resample-dep-warning.rst @@ -0,0 +1,23 @@ +**Added:** + +* Deprecation warning for resample function in resampler + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* diff --git a/src/diffpy/utils/resampler.py b/src/diffpy/utils/resampler.py index e88c4f0b..3687f3ad 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.""" +from warnings import deprecated + import numpy @@ -77,6 +79,10 @@ def wsinterp(x, xp, fp, left=None, right=None): return fp_at_x +@deprecated( + "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." +) def resample(r, s, dr): """Resample a PDF on a new grid.