python2 compat: don't assume true division
This commit is contained in:
parent
0a8d5b253a
commit
4553b55f73
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user