import numpy as np
a = [0, 1, 2, 3, 4] #一次元配列1
b = [5, 6, 7, 8, 9] #一次元配列2
c = np.c_[a, b].flat[:] #合成
print(c)
out
[0 5 1 6 2 7 3 8 4 9] #出力はndarrayです
Go to list of users who liked
More than 3 years have passed since last update.
import numpy as np
a = [0, 1, 2, 3, 4] #一次元配列1
b = [5, 6, 7, 8, 9] #一次元配列2
c = np.c_[a, b].flat[:] #合成
print(c)
[0 5 1 6 2 7 3 8 4 9] #出力はndarrayです
Register as a new user and use Qiita more conveniently
Go to list of users who liked