numpy一维2维

v1 = np.arange(100)
v2 = v1.reshape((20,5))
print(v2)

"""
转一维
"""
v1 = v2.reshape((100,))
print(v1)

在这里插入图片描述