From 4553b55f736ba142619d9969bbd55bcda6db9824 Mon Sep 17 00:00:00 2001 From: KIU Shueng Chuan Date: Fri, 20 Jan 2017 09:09:18 +0800 Subject: [PATCH] python2 compat: don't assume true division --- pyqtgraph/graphicsItems/PlotDataItem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyqtgraph/graphicsItems/PlotDataItem.py b/pyqtgraph/graphicsItems/PlotDataItem.py index 485576f6..a26c1c72 100644 --- a/pyqtgraph/graphicsItems/PlotDataItem.py +++ b/pyqtgraph/graphicsItems/PlotDataItem.py @@ -681,7 +681,7 @@ class PlotDataItem(GraphicsObject): x = x2 n = y.size f = np.fft.rfft(y) / n - d = (x[-1] - x[0]) / (n - 1) + d = float(x[-1]-x[0]) / (len(x)-1) x = np.fft.rfftfreq(n, d) y = np.abs(f) return x, y