diff --git a/doc/conf.py b/doc/conf.py index c2ebc772..bfb596b9 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -71,15 +71,7 @@ # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] -# http://read-the-docs.readthedocs.org/en/latest/theme.html#how-do-i-use-this-locally-and-on-read-the-docs -# on_rtd is whether we are on readthedocs.org -on_rtd = os.environ.get("READTHEDOCS", None) == "True" -if not on_rtd: - # Import and set the theme if we're building docs locally - import sphinx_rtd_theme - - html_theme = "sphinx_rtd_theme" - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +html_theme = "sphinx_rtd_theme" nbsphinx_kernel_name = "python3" nbsphinx_execute_arguments = [ diff --git a/src/iminuit/cost.py b/src/iminuit/cost.py index b8277502..76a75436 100644 --- a/src/iminuit/cost.py +++ b/src/iminuit/cost.py @@ -254,7 +254,7 @@ def poisson_chi2(n: ArrayLike, mu: ArrayLike) -> float: n : array-like Observed counts. mu : array-like - Expected counts per bin. Must satisfy sum(mu) == sum(n). + Expected counts per bin. Returns ------- @@ -265,6 +265,8 @@ def poisson_chi2(n: ArrayLike, mu: ArrayLike) -> float: ----- The implementation makes the result asymptotically chi2-distributed, which helps to maximise the numerical accuracy for Minuit. + + If sum(mu) == sum(n), the result is equal to :func:`multinomial_chi2`. """ n, mu = np.atleast_1d(n, mu) return 2 * np.sum(n * (log_or_zero(n) - log_or_zero(mu)) + mu - n) @@ -286,7 +288,7 @@ def multinomial_chi2(n: ArrayLike, mu: ArrayLike) -> float: n : array-like Observed counts. mu : array-like - Expected counts. + Expected counts. Must satisfy sum(mu) == sum(n). Returns -------