I have a 2d numpy array
a = array([[1,2],[3,4]])
I want to
array([[1,1,2,2],
[1,1,2,2],
[3,3,4,4],
[3,3,4,4]])
I can do it with 2 calls numpy.repeat
repeat(repeat(a,2,axis=0),2,axis=1)
But is there any combination of parameters for this with a single call?
source
share