Appending (hstack) a comformable array to a matrix returns error
<p>I am trying to <code>np.hstack</code> an array to a matrix. The array has <code>.shape</code> <code>(a,)</code>, the matrix has <code>.shape</code> <code>(a,b)</code>, with <code>a</code> and <code>b</code> integers. I get the error that dimensions do not match (<code>all the input arrays must have same number of dimensions</code>). What should I do to <code>hstack</code> these conformable objects?</p>

<p>Another option is </p>

<pre><code>np.transpose(np.asmatrix(a))
</code></pre>

<p>before appending.</p>

python append