numpy 1.6.1 (ubuntu 12.04) does not allow named argument to astype

This commit is contained in:
j 2014-10-12 16:02:29 +02:00
parent 5e4f196084
commit b8cb761dea

View file

@ -165,7 +165,7 @@ def audio(path, info=None, samplerate=48000, framerate=FPS):
else: else:
first = False first = False
audio = np.fromstring(data, dtype="int16") audio = np.fromstring(data, dtype="int16")
audio = audio.reshape((len(audio)/channels,channels)).astype(dtype='float') audio = audio.reshape((len(audio)/channels,channels)).astype('float')
yield audio yield audio
def rms(x, axis=None): def rms(x, axis=None):