python不同数组表达方式的区别
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.fra.
原创
2021-03-16 15:01:29 ·
130 阅读 ·
0 评论