Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs #1052

Merged
merged 2 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
6 changes: 4 additions & 2 deletions src/iminuit/cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
-------
Expand All @@ -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)
Expand All @@ -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
-------
Expand Down