Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions news/resample-dep.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* `resample` function in resampler. Replaced with `wsinterp` with better functionality.

**Removed:**

* <news item>

**Fixed:**

* <news item>

**Security:**

* <news item>
9 changes: 9 additions & 0 deletions src/diffpy/utils/resampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

"""Various utilities related to data parsing and manipulation."""

import warnings

import numpy as np


Expand Down Expand Up @@ -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:
Expand Down
Loading