如何解决RuntimeWarning: overflow encountered in exp?

显示错误提示如下:
Flsf.py:92: RuntimeWarning: overflow encountered in exp
RP += (np.exp(M_PS[row_C, n]) - np.exp(-M_PS[row_C, n])) / (np.exp(M_PS[row_C, n]) + np.exp(-M_PS[row_C, n]))
Flsf.py:92: RuntimeWarning: invalid value encountered in double_scalars
RP += (np.exp(M_PS[row_C, n]) - np.exp(-M_PS[row_C, n])) / (np.exp(M_PS[row_C, n]) + np.exp(-M_PS[row_C, n]))

参数值过大了数值溢出,把规模缩小