I was wondering if there\'s a function that takes a list X as input and outputs a column vector corresponding to X?
X
(I looked around and I susp
similar but different:
mylist=[2,3,4,5,6]
method1:
np.array([[i] for i in mylist])
output:
array([[2], [3], [4], [5], [6]])
method 2:
np.array(mylist).reshape(len(mylist),1) output: array([[2], [3], [4], [5], [6]])