a = np.r_[1:4,0,4] 这语法有点神奇

a = np.r_[1:4,0,4]
print(a)
[1 2 3 0 4]
原文地址:https://www.cnblogs.com/DDBD/p/13995151.html