Add type hints to Wave.__getitem__

pull/357/head
nyanpasu64 2018-07-15 03:09:48 -07:00
rodzic b01251fd21
commit 90b2dc5afd
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -39,7 +39,7 @@ class Wave:
self.offset = 0
self.max_val = max_val
def __getitem__(self, index):
def __getitem__(self, index: int) -> 'np.ndarray[FLOAT]':
""" Copies self.data[item], converted to a FLOAT within range [-1, 1). """
data = self.data[index].astype(FLOAT)
data += self.offset