From faf069cc480dc59b8c35b61e77141e8dfd1deb93 Mon Sep 17 00:00:00 2001 From: Yan Wong Date: Wed, 17 Jul 2024 00:41:42 +0100 Subject: [PATCH 1/4] Space typo --- tsdate/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tsdate/cli.py b/tsdate/cli.py index d52c9da9..8abf27b1 100644 --- a/tsdate/cli.py +++ b/tsdate/cli.py @@ -155,7 +155,7 @@ def tsdate_cli_parser(): "--rescaling-intervals", type=float, help=( - "The number of time intervals within which to estimate a time scaling" + "The number of time intervals within which to estimate a time scaling " f"parameter. Default: None treated as {core.DEFAULT_RESCALING_INTERVALS}" ), default=None, From 43aa3d95f40f9254fbb9a92c4d7f331262b0937d Mon Sep 17 00:00:00 2001 From: Yan Wong Date: Wed, 17 Jul 2024 01:00:36 +0100 Subject: [PATCH 2/4] Numpy2 compat --- tsdate/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tsdate/core.py b/tsdate/core.py index f5023b47..a90cbf7e 100644 --- a/tsdate/core.py +++ b/tsdate/core.py @@ -409,17 +409,17 @@ class LogLikelihoods(Likelihoods): @staticmethod @numba.jit(nopython=True) def logsumexp(X): - alpha = -np.Inf + alpha = -np.inf r = 0.0 for x in X: - if x != -np.Inf: + if x != -np.inf: if x <= alpha: r += np.exp(x - alpha) else: r *= np.exp(alpha - x) r += 1.0 alpha = x - return -np.Inf if r == 0 else np.log(r) + alpha + return -np.inf if r == 0 else np.log(r) + alpha @staticmethod def _lik(muts, span, dt, mutation_rate, standardize=True): From e6c8147238b330bf7a871463142f5a542bad6c6c Mon Sep 17 00:00:00 2001 From: Yan Wong Date: Wed, 17 Jul 2024 01:11:36 +0100 Subject: [PATCH 3/4] Unpin msprime in docs --- docs/requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 60cc613c..d9b23bff 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -18,7 +18,7 @@ sphinxcontrib-bibtex humanize==4.7.0 lmdb==1.4.1 tqdm==4.66.3 -daiquiri==3.2.1 -msprime==1.2.0 +daiquiri +msprime ipywidgets==8.1.0 sphinx-book-theme #Unpinned to allow easy updating. From 0f2e6390428528c0a85fb4fb961addef868a25db Mon Sep 17 00:00:00 2001 From: Yan Wong Date: Wed, 17 Jul 2024 01:16:29 +0100 Subject: [PATCH 4/4] Update _config.yml --- docs/_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_config.yml b/docs/_config.yml index a8ed737c..747e3b2a 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -46,7 +46,7 @@ sphinx: config: html_theme: sphinx_book_theme html_theme_options: - pygment_dark_style: monokai + pygments_dark_style: monokai pygments_style: monokai bibtex_reference_style: author_year myst_enable_extensions: