Mercurial > hg > chourdakisreiss2016
diff experiment-reverb/code/reshape_observations.py @ 0:246d5546657c
initial commit, needs cleanup
author | Emmanouil Theofanis Chourdakis <e.t.chourdakis@qmul.ac.uk> |
---|---|
date | Wed, 14 Dec 2016 13:15:48 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/experiment-reverb/code/reshape_observations.py Wed Dec 14 13:15:48 2016 +0000 @@ -0,0 +1,15 @@ +from numpy import array, zeros + +def reshape_observations(L): + + rows = L[0].shape[0] + columns = L[0].shape[1]*len(L) + columns_one = L[0].shape[1] + + newarray = zeros((rows, columns)) + + for i in range(0, len(L)): + newarray[:,i*columns_one:(i+1)*columns_one] = L[i] + + return newarray +