You can use
import warnings;
warnings.simplefilter('ignore')
at the start of your program to ignore all warnings.
If you want to ignore only that specific warning then use “seterr”
np.seterr(divide = 'ignore')
logts = np.log(ts)
np.seterr(divide = 'warn')
CLICK HERE to find out more related problems solutions.