ipython suppress warnings code example Example: python suppress warnings in function import warnings warnings.filterwarnings("ignore")