import warnings
warnings.filterwarnings(action="ignore",
    message=r".*RuntimeWarning: (under|over)flow encountered in .*")
import warnings
warnings.filterwarnings(action="ignore",
    message=r".*RuntimeWarning: divide by zero encountered in .*")
