Mercurial > hg > chourdakisreiss2016
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:246d5546657c |
---|---|
1 from numpy import array, zeros | |
2 | |
3 def reshape_observations(L): | |
4 | |
5 rows = L[0].shape[0] | |
6 columns = L[0].shape[1]*len(L) | |
7 columns_one = L[0].shape[1] | |
8 | |
9 newarray = zeros((rows, columns)) | |
10 | |
11 for i in range(0, len(L)): | |
12 newarray[:,i*columns_one:(i+1)*columns_one] = L[i] | |
13 | |
14 return newarray | |
15 |