annotate experiment-reverb/code/reshape_observations.py @ 2:c87a9505f294 tip

Added LICENSE for code, removed .wav files
author Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk>
date Sat, 30 Sep 2017 13:25:50 +0100
parents 246d5546657c
children
rev   line source
e@0 1 from numpy import array, zeros
e@0 2
e@0 3 def reshape_observations(L):
e@0 4
e@0 5 rows = L[0].shape[0]
e@0 6 columns = L[0].shape[1]*len(L)
e@0 7 columns_one = L[0].shape[1]
e@0 8
e@0 9 newarray = zeros((rows, columns))
e@0 10
e@0 11 for i in range(0, len(L)):
e@0 12 newarray[:,i*columns_one:(i+1)*columns_one] = L[i]
e@0 13
e@0 14 return newarray
e@0 15