numpy模块 2017-09-25 本文已影响7人 glassyw np.nan_to_num(x) #使用0代替数组x中的nan元素,使用有限的数字代替inf元素(nan元素:not a number)