Hi,
is there any possibility to define a numpy matrix, via a smaller given
matrix, i.e. in matlab
i can do this like
a=[1 2 ; 3 4 ]
A=[a a ; a a ]
so that i finally get
A=[ [1,2,1,2]
[3,4,3,4]
[1,2,1,2]
[3,4,3,4]]
i tried different things on numpy which didn't work
On Thu, Dec 1, 2011 at 10:52 AM, jonasr jonas.rueb...@web.de wrote:
Hi,
is there any possibility to define a numpy matrix, via a smaller given
matrix, i.e. in matlab
i can do this like
a=[1 2 ; 3 4 ]
A=[a a ; a a ]
so that i finally get
A=[ [1,2,1,2]
[3,4,3,4]
[1,2,1,2]
Hi,
On Thu, Dec 1, 2011 at 6:52 PM, jonasr jonas.rueb...@web.de wrote:
Hi,
is there any possibility to define a numpy matrix, via a smaller given
matrix, i.e. in matlab
i can do this like
a=[1 2 ; 3 4 ]
A=[a a ; a a ]
so that i finally get
A=[ [1,2,1,2]
[3,4,3,4]
On Thu, Dec 1, 2011 at 12:26 PM, Benjamin Root ben.r...@ou.edu wrote:
On Thu, Dec 1, 2011 at 10:52 AM, jonasr jonas.rueb...@web.de wrote:
Hi,
is there any possibility to define a numpy matrix, via a smaller given
matrix, i.e. in matlab
i can do this like
a=[1 2 ; 3 4 ]
A=[a a ; a a ]
Oops, slightly incorrect answer, but anyway my intention was more along the
lines:
In []: a= np.array([[1, 2], [3, 4]])
In []: np.c_[[a, a], [a, a]].reshape(4, 4)
Out[]:
array([[1, 2, 1, 2],
[3, 4, 3, 4],
[1, 2, 1, 2],
[3, 4, 3, 4]])
On Thu, Dec 1, 2011 at 8:16 PM,