Numpy Tile
x = np.array([[1, 2],
[3, 4]])
print(x)
print(x.shape)
[[1 2]
[3 4]]
(2, 2)
x1 = np.tile(x, (1, 2))
print(x1)
print(x1.shape)
[[1 2 1 2]
[3 4 3 4]]
(2, 4)
x = np.array([[1, 2],
[3, 4]])
print(x)
print(x.shape)
[[1 2]
[3 4]]
(2, 2)
x1 = np.tile(x, (1, 2))
print(x1)
print(x1.shape)
[[1 2 1 2]
[3 4 3 4]]
(2, 4)