Fix ZeroCrossingTrigger slowdown by removing `idx in range(...)`

pull/357/head
nyanpasu64 2018-07-15 04:05:41 -07:00
rodzic 709661dd93
commit e23145e193
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -197,7 +197,7 @@ class ZeroCrossingTrigger(Trigger):
def get_trigger(self, index: int):
scan_nsamp = self._scan_nsamp
if index not in range(len(self._wave.data)):
if not 0 <= index < self._wave.nsamp:
return index
if self._wave[index] < 0: