Commit 12f74332 authored by Paul Bethge's avatar Paul Bethge
Browse files

fix data loss by cast

parent 8b24b2e3
...@@ -30,7 +30,7 @@ def pad_with_silence(data, max_len): ...@@ -30,7 +30,7 @@ def pad_with_silence(data, max_len):
def pad_with_data(data, max_len): def pad_with_data(data, max_len):
to_add = max(max_len - len(data), 0) to_add = max(max_len - len(data), 0)
padded = np.zeros(shape=(max_len,), dtype="int16") padded = np.zeros(shape=(max_len,), dtype="float32")
if to_add: if to_add:
repeat = int(max_len / len(data)) repeat = int(max_len / len(data))
rest = max_len % len(data) rest = max_len % len(data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment