>>> a = np.array([1, 2, 3 ]) >>> a = a.reshape(-1, 1 ) #-1 means any number of rows, 1 means 1 column >>> a array([[1], [2], [3]])
Sometimes the interface will report an error, you need to reshape it
>>> a = np.array([1, 2, 3 ]) >>> a = a.reshape(-1, 1 ) #-1 means any number of rows, 1 means 1 column >>> a array([[1], [2], [3]])
Sometimes the interface will report an error, you need to reshape it