1# numpy array/vector (n,) dimension -> (n,1) dimension conversion
2a = np.arange(3) # a.shape = (3,)
3b = a.reshape((3,1)) # b.shape = (3,1)
4c = b.reshape((3,)) # c.shape = (3,)
5
6c2 = b.reshape((-1,1)) # c2.shape = (3,)
1'''
2This code is contributed by :
3Tanishq Vyas (github : https://github.com/tanishqvyas )
4'''
5
6actual = actual.reshape((actual.shape[0], 1))