kopia lustrzana https://github.com/corrscope/corrscope
Add type hints to Wave.__getitem__
rodzic
b01251fd21
commit
90b2dc5afd
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue