import numpy
as np
a
= [[1,2,3],[4,5,6]]
b
= [[1,1,1],[2,2,2]]
c
= np
.vstack
((a
,b
))
c
=
array
([[1, 2, 3],
[4, 5, 6],
[1, 1, 1],
[2, 2, 2]]
c
= np
.r_
[a
,b
]
c
= array
([[1, 2, 3],
[4, 5, 6],
[1, 1, 1],
[2, 2, 2]])
d
= np
.hstack
((a
,b
))
d
= array
([[1, 2, 3, 1, 1, 1],
[4, 5, 6, 2, 2, 2]])
d
= np
.c_
[a
,b
]
d
= array
([[1, 2, 3, 1, 1, 1],
[4, 5, 6, 2, 2, 2]])
来自:https://www.jb51.net/article/138137.htm
转载请注明原文地址:https://tech.qufami.com/read-17139.html