Skip to content

Commit 870ae18

Browse files
authored
Merge pull request #417 from hyanwong/typo
Numpy 2 compatibility
2 parents e0210f7 + 0f2e639 commit 870ae18

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ sphinx:
4646
config:
4747
html_theme: sphinx_book_theme
4848
html_theme_options:
49-
pygment_dark_style: monokai
49+
pygments_dark_style: monokai
5050
pygments_style: monokai
5151
bibtex_reference_style: author_year
5252
myst_enable_extensions:

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sphinxcontrib-bibtex
1818
humanize==4.7.0
1919
lmdb==1.4.1
2020
tqdm==4.66.3
21-
daiquiri==3.2.1
22-
msprime==1.2.0
21+
daiquiri
22+
msprime
2323
ipywidgets==8.1.0
2424
sphinx-book-theme #Unpinned to allow easy updating.

tsdate/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def tsdate_cli_parser():
155155
"--rescaling-intervals",
156156
type=float,
157157
help=(
158-
"The number of time intervals within which to estimate a time scaling"
158+
"The number of time intervals within which to estimate a time scaling "
159159
f"parameter. Default: None treated as {core.DEFAULT_RESCALING_INTERVALS}"
160160
),
161161
default=None,

tsdate/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,17 +409,17 @@ class LogLikelihoods(Likelihoods):
409409
@staticmethod
410410
@numba.jit(nopython=True)
411411
def logsumexp(X):
412-
alpha = -np.Inf
412+
alpha = -np.inf
413413
r = 0.0
414414
for x in X:
415-
if x != -np.Inf:
415+
if x != -np.inf:
416416
if x <= alpha:
417417
r += np.exp(x - alpha)
418418
else:
419419
r *= np.exp(alpha - x)
420420
r += 1.0
421421
alpha = x
422-
return -np.Inf if r == 0 else np.log(r) + alpha
422+
return -np.inf if r == 0 else np.log(r) + alpha
423423

424424
@staticmethod
425425
def _lik(muts, span, dt, mutation_rate, standardize=True):

0 commit comments

Comments
 (0)