RuntimeWarning: invalid value encountered in divide

I think your code is trying to “divide by zero” or “divide by NaN”. If you are aware of that and don’t want it to bother you, then you can try:

import numpy as np
np.seterr(divide="ignore", invalid='ignore')

For more details see:

  • http://docs.scipy.org/doc/numpy/reference/generated/numpy.seterr.html

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)