Suppress zero division warnings in get_wstat_gof_terms
@@ -200,6 +200,10 @@ def get_wstat_gof_terms(n_on, n_off):
see :ref:`wstat`.
"""
term = np.zeros(len(n_on))
+
+ # suppress zero division warnings, they are corrected below
+ with np.warnings.catch_warnings():
+ np.warnings.filterwarnings('ignore')
term1 = - n_on * (1 - np.log(n_on))
term2 = - n_off * (1 - np.log(n_off))
