Mercurial > hg > chourdakisreiss2016
view 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 source
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