ax2_cid = np.random.rand(10)
shape = 10, 3
x2_Kaxs = np.empty((10, 3), dtype=object).reshape(-1)
for j in range(x2_Kaxs.size):
    x2_Kaxs[j] = [random.randint(0, 9) for k in range(random.randint(1, 5))]
x2_Kaxs.shape = shape
x2_Kaxs_1 = np.empty((10, 3), dtype=object).reshape(-1)
for j in range(x2_Kaxs.size):
    x2_Kaxs_1[j] = [random.randint(0, 9)]
x2_Kaxs_1.shape = shape
x2_Kaxs_2 = np.empty((10, 3), dtype=object).reshape(-1)
for j in range(x2_Kaxs_2.size):
    x2_Kaxs_2[j] = [random.randint(0, 9) for k in range(2)]
x2_Kaxs_2.shape = shape
Force numpy to keep a list a list