RuntimeWarning: invalid value encountered in divide

1 import numpy as np
2 olderr = np.seterr(all='ignore')

在程序的开头加上如上代码

 https://docs.scipy.org/doc/numpy/reference/generated/numpy.linspace.html

转载于:https://www.cnblogs.com/zle1992/p/6026472.html

你可能感兴趣的:(python,人工智能)