import numpy as np from numpy import pi a = np.arange(24).reshape(4, 6).reshape(8, 3) print(a.ravel()) print(a.ravel().reshape(2, 12)) b = a.T print(b) print(a.shape, b.shape) a.resize(4, 6) # a has changed directly print(a.shape)
numpy学习笔记(二):维度变化
猜你喜欢
转载自blog.csdn.net/qq_30986521/article/details/80819335
今日推荐
周排行