Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下2个数组:
k=arange(1,100) m=arange(1,100)
那么如何将它们附加或组合成一个 2 列 99 行的数组呢?
vstack,hstack并且transpose是你的朋友,因为这样的事情。
vstack
hstack
transpose
>>> vstack([k,m]).transpose() array([[ 1, 1], [ 2, 2], [ 3, 3], ... [98, 98], [99, 99]])