import numpy as np np.set_printoptions(threshold=np.inf) 大量元素情况可以采用set_printoptions(threshold='nan')set_printoptions(threshold='nan')