numpy vs 1.14 fix

This commit is contained in:
Shua Dissen
2018-01-24 15:03:06 +02:00
committed by GitHub
parent ea5fb3e42f
commit a8360af25c
+2 -1
View File
@@ -26,7 +26,8 @@ def build_data(wav,begin=None,end=None):
dstr = wav_in_file.readframes(N)
data = np.fromstring(dstr, np.int16)
if begin is not None and end is not None:
return data[begin*16000:end*16000]
#return data[begin*16000:end*16000] #numpy 1.11.0
return data[np.int(begin*16000):np.int(end*16000)] #numpy 1.14.0
X = []
l = len(data)
for i in range(0, l-100, 160):