Coverage for python/lsst/analysis/tools/warning_control.py: 100%
13 statements
« prev ^ index » next coverage.py v7.5.0, created at 2024-04-24 04:09 -0700
« prev ^ index » next coverage.py v7.5.0, created at 2024-04-24 04:09 -0700
1# This file is part of analysis_tools.
2#
3# Developed for the LSST Data Management System.
4# This product includes software developed by the LSST Project
5# (https://www.lsst.org).
6# See the COPYRIGHT file at the top-level directory of this distribution
7# for details of code ownership.
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <https://www.gnu.org/licenses/>.
22__all__ = (
23 "filterwarnings_action",
24 "numpy_all_nan",
25 "numpy_all_nan_slice",
26 "numpy_divide_zero_divide",
27 "numpy_divide_zero_log",
28 "numpy_divide_zero_log10",
29 "numpy_dof_zero",
30 "numpy_invalid_value_divide",
31 "numpy_invalid_value_log",
32 "numpy_invalid_value_log10",
33 "numpy_invalid_value_sqrt",
34 "numpy_mean_empty",
35)
37# This will be applied to all actions.
38# "ignore" and "error" should be used for running and debugging, respectively.
39filterwarnings_action = "ignore"
41numpy_all_nan = r"All-NaN axis encountered"
42numpy_all_nan_slice = r"All-NaN slice encountered"
43numpy_divide_zero_divide = r"divide by zero encountered in divide"
44numpy_divide_zero_log = r"divide by zero encountered in log"
45numpy_divide_zero_log10 = r"divide by zero encountered in log10"
46numpy_dof_zero = r"Degrees of freedom <= 0 for slice."
47numpy_invalid_value_divide = r"invalid value encountered in divide"
48numpy_invalid_value_log = r"invalid value encountered in log"
49numpy_invalid_value_log10 = r"invalid value encountered in log10"
50numpy_invalid_value_sqrt = r"invalid value encountered in sqrt"
51numpy_mean_empty = r"Mean of empty slice"