一.数组横向纵向合并
import numpy as np
a=np.array([1,1,1])
b=np.array([2,2,2])
c=np.vstack((a,b)) #vertical stack垂直合并
d=np.hstack((a,b))#horizontal stack水平合并
print(a.shape ) # (3,)
print(c.shape) # (2,3)
print(d.shape) # (6,)
print(a[np
一.数组横向纵向合并
import numpy as np
a=np.array([1,1,1])
b=np.array([2,2,2])
c=np.vstack((a,b)) #vertical stack垂直合并
d=np.hstack((a,b))#horizontal stack水平合并
print(a.shape ) # (3,)
print(c.shape) # (2,3)
print(d.shape) # (6,)
print(a[np