import numpy as np
test = np.array([1,3,5])
print(test.shape)
print(test)
print('=='*10)
test1 = test.reshape(1,-1)
print(test1.shape)
print(test1)
print('=='*10)
test2 = test.reshape(-1,1)
print(test2.shape)
print(test2)
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3 /Users/sacrific7e/Downloads/source/ch03/test.py
(3,)
[1 3 5]
====================
(1, 3)
[[1 3 5]]
====================
(3, 1)
[[1]
[3]
[5]]
Process finished with exit code 0