import numpy as np np.set_printoptions(threshold=np.inf) 或者 np.set_printoptions(threshold='nan')其中threshold表示: Total number of array elements to be print(输出数组的元素数目)