I want to slice a column, but this gives me a one dimensional array. i.e.
import numpy as np
a = np.arange(9).reshape(3,3)
b = a[1,:]
b.shape
# (3,)
But I want it to be 2 dimensional, i.e. (3,1)
Is there a way to do this without reshaping?
I want to slice a column, but this gives me a one dimensional array. i.e.
import numpy as np
a = np.arange(9).reshape(3,3)
b = a[1,:]
b.shape
# (3,)
But I want it to be 2 dimensional, i.e. (3,1)
Is there a way to do this without reshaping?