Skip to content

Commit ce00937

Browse files
authored
Merge pull request #268 from Tieqiong/interp_xtype
fix: fix TypeError when using Nyquist interp
2 parents 494623c + 8b3c51f commit ce00937

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

news/interp_xtype.rst

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* Fixed TypeError when using Nyquist interp.
20+
21+
**Security:**
22+
23+
* <news item>

src/diffpy/pdfgui/control/fitdataset.py

+3
Original file line numberDiff line numberDiff line change
@@ -848,6 +848,9 @@ def grid_interpolation(x0, y0, x1, left=None, right=None, tp=None):
848848
Otherwise it uses the internal :func:`_linear_interpolation` routine.
849849
"""
850850
if tp == "Nyquist":
851+
x0 = numpy.asarray(x0)
852+
x1 = numpy.asarray(x1)
853+
y0 = numpy.asarray(y0)
851854
return wsinterp(x1, x0, y0, left, right)
852855
else:
853856
left = 0.0 if left is None else left

0 commit comments

Comments
 (0)