'''
reshape函数使用
'''
x = np.arange(16).reshape(4,4)
print x
x = x.reshape(-1,16)
print x
[[ 0 1 2 3]
[ 4 5 6 7]
[ 8 9 10 11]
[12 13 14 15]]
[[ 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.
14. 15.]]
reshape函数使用
最新推荐文章于 2024-08-14 21:29:00 发布