In [1]:
import numpy as np

In [2]:
a1 = np.ones((2, 3), int)
print(a1)


[[1 1 1]
 [1 1 1]]

In [3]:
a2 = np.full((2, 3), 2)
print(a2)


[[2 2 2]
 [2 2 2]]

In [4]:
print(np.vstack([a1, a2]))


[[1 1 1]
 [1 1 1]
 [2 2 2]
 [2 2 2]]

In [5]:
print(np.concatenate([a1, a2], 0))


[[1 1 1]
 [1 1 1]
 [2 2 2]
 [2 2 2]]

In [6]:
a1 = np.ones(3, int)
print(a1)


[1 1 1]

In [7]:
a2 = np.full(3, 2)
print(a2)


[2 2 2]

In [8]:
print(np.vstack([a1, a2]))


[[1 1 1]
 [2 2 2]]

In [9]:
print(np.stack([a1, a2], 0))


[[1 1 1]
 [2 2 2]]

In [10]:
a1 = np.ones((2, 3), int)
print(a1)


[[1 1 1]
 [1 1 1]]

In [11]:
a2 = np.full(3, 2)
print(a2)


[2 2 2]

In [12]:
print(np.vstack([a1, a2]))


[[1 1 1]
 [1 1 1]
 [2 2 2]]