I am trying to reshape some arrays into a specific order but numpy.reshape is not solving my problem and I don't want to use any loops unless I really have to.
Let's take an array a with values:
a = [['x1','x2','x3','y1','y2','y3','z1','z2','z3'],
['x4','x5','x6','y4','y5','y6','z4','z5','z6']]
and np.reshape(a,[-1,18]) returns:
array([['x1', 'x2', 'x3', 'y1', 'y2', 'y3', 'z1', 'z2', 'z3',
'x4', 'x5','x6', 'y4', 'y5', 'y6', 'z4', 'z5', 'z6']], dtype='<U2')
but is it possible to get a result like this:
[['x1', 'x2', 'x3','x4', 'x5','x6', 'y1', 'y2', 'y3','y4', 'y5', 'y6',
'z1', 'z2', 'z3', 'z4', 'z5', 'z6']]