Skip to content

Commit a6a94f4

Browse files
committed
Merge branch 'feat/more_functional'
2 parents ca3375d + b726bed commit a6a94f4

File tree

3 files changed

+41
-30
lines changed

3 files changed

+41
-30
lines changed

docs/markdown/API.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,15 @@
1717
1818
.. currentmodule:: nuance
1919
20-
.. autofunction:: linear_search
21-
.. autofunction:: periodic_search
20+
.. automodule:: nuance.linear_search
21+
:members:
22+
:show-inheritance:
23+
24+
25+
.. automodule:: nuance.periodic_search
26+
:members:
27+
:show-inheritance:
28+
2229
2330
.. automodule:: nuance.core
2431
:members:

docs/notebooks/motivation.ipynb

Lines changed: 24 additions & 22 deletions
Large diffs are not rendered by default.

nuance/linear_search.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
import jax.numpy as jnp
33
import numpy as np
44
from tqdm.auto import tqdm
5+
from typing import Callable
6+
import tinygp
57

68
from nuance import DEVICES_COUNT, core
79

810

911
def linear_search(
10-
time,
11-
flux,
12-
gp=None,
13-
X=None,
14-
model=None,
12+
time: np.ndarray,
13+
flux: np.ndarray,
14+
gp: tinygp.GaussianProcess | None = None,
15+
X: np.ndarray | None = None,
16+
model: Callable | None = None,
1517
positive: bool = True,
1618
progress: bool = True,
1719
backend: str | None = None,
@@ -58,7 +60,7 @@ def linear_search(
5860
jax.vmap(jax.vmap(solver, in_axes=(None, 0)), in_axes=(0, None))
5961
)
6062

61-
def function(epochs, durations):
63+
def function(epochs: np.ndarray, durations: np.ndarray):
6264
"""Compute the log likelihood of a transit model at different epochs and durations
6365
6466
Parameters

0 commit comments

Comments
 (0)