numpy.transpose() 和T 可以將陣列的行與列互換,產生新的陣列。 import numpy as np a = np.array([[1,2],[3,4]]) b = a.T c = np.transpose(a) print(b) ''' [[1 3] ...
確定! 回上一頁