Reshape numpy (n,) vector to (n,1) vector : <p>So it is easier for me to think about vectors as column vectors when I need to do some linear algebra. Thus I prefer shapes like (n,1). </p>

<p>Is there significant memory usage difference between shapes (n,) and (n,1)? </p>

<p>What is preferred way? </p>

<p>And how to reshape (n,) vector into (n,1) vector. Somehow b.reshape((n,1)) doesn't do the trick. </p>

<pre><code>a = np.random.random((10,1))
b = np.ones((10,))
b.reshape((10,1))
print(a)
print(b)

[[ 0.76336295]
 [ 0.71643237]
 [ 0.37312894]
 [ 0.33668241]
 [ 0.55551975]
 [ 0.20055153]
 [ 0.01636735]
 [ 0.5724694 ]
 [ 0.96887004]
 [ 0.58609882]]
[ 1.  1.  1.  1.  1.  1.  1.  1.  1.  1.]
</code></pre>
