You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Activating the FFT transform on data with one point raises the following error:
File ~\anaconda3\lib\site-packages\pyqtgraph\graphicsItems\PlotDataItem.py:1190 in _fourierTransform
uniform = not np.any(np.abs(dx-dx[0]) > (abs(dx[0]) / 1000.))
IndexError: index 0 is out of bounds for axis 0 with size 0
This occurs because dx = np.diff(x) is empty when x is of size 1.
A possible solution is to add the following condition if len(x) == 1: return np.array([0]), abs(y) in the beginning of _fourierTransform in PlotDataItem.py.
PyQtGraph version: tested on 0.13.3 but will also raise same error in 0.13.7 has the relevant code has not changed.
The text was updated successfully, but these errors were encountered:
Activating the FFT transform on data with one point raises the following error:
This occurs because
dx = np.diff(x)
is empty when x is of size 1.A possible solution is to add the following condition
if len(x) == 1: return np.array([0]), abs(y)
in the beginning of _fourierTransform in PlotDataItem.py.The text was updated successfully, but these errors were encountered: