Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy reshape (n ) to (n 1)

""" assuming that v is a numpy array with shape (N, ) """
new_v = v.reshape(-1, 1) # new_v.shape is (N, 1)
Source by numpy.org #
 
PREVIOUS NEXT
Tagged: #numpy #reshape
ADD COMMENT
Topic
Name
2+2 =