擅长:python、mysql、java
<p>还有<code>np.c_</code></p>
<pre><code>>>> a = np.arange(20).reshape(5, 4)
>>> b = np.arange(-1, -6, -1)
>>> a
array([[ 0, 1, 2, 3],
[ 4, 5, 6, 7],
[ 8, 9, 10, 11],
[12, 13, 14, 15],
[16, 17, 18, 19]])
>>> b
array([-1, -2, -3, -4, -5])
>>> np.c_[a, b]
array([[ 0, 1, 2, 3, -1],
[ 4, 5, 6, 7, -2],
[ 8, 9, 10, 11, -3],
[12, 13, 14, 15, -4],
[16, 17, 18, 19, -5]])
</code></pre>