Skip to content

Commit 7cc24bc

Browse files
michaelosthegericardoV94
authored andcommitted
Docstring formatting and type hints
1 parent e6537e4 commit 7cc24bc

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

pymc/model.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,10 +1603,13 @@ def compile_fn(
16031603
16041604
Parameters
16051605
----------
1606-
outs: Aesara variable or iterable of Aesara variables
1607-
inputs: Aesara input variables, defaults to aesaraf.inputvars(outs).
1608-
mode: Aesara compilation mode, default=None
1609-
point_fn:
1606+
outs
1607+
Aesara variable or iterable of Aesara variables.
1608+
inputs
1609+
Aesara input variables, defaults to aesaraf.inputvars(outs).
1610+
mode
1611+
Aesara compilation mode, default=None.
1612+
point_fn : bool
16101613
Whether to wrap the compiled function in a PointFunc, which takes a Point
16111614
dictionary with model variable names and values as input.
16121615
@@ -1872,16 +1875,24 @@ def set_data(new_data, model=None, *, coords=None):
18721875
model.set_data(variable_name, new_value, coords=coords)
18731876

18741877

1875-
def compile_fn(outs, mode=None, point_fn=True, model=None, **kwargs):
1878+
def compile_fn(
1879+
outs, mode=None, point_fn: bool = True, model: Optional[Model] = None, **kwargs
1880+
) -> Union[PointFunc, Callable[[Sequence[np.ndarray]], Sequence[np.ndarray]]]:
18761881
"""Compiles an Aesara function which returns ``outs`` and takes values of model
18771882
vars as a dict as an argument.
1883+
18781884
Parameters
18791885
----------
1880-
outs: Aesara variable or iterable of Aesara variables
1881-
mode: Aesara compilation mode
1882-
point_fn:
1886+
outs
1887+
Aesara variable or iterable of Aesara variables.
1888+
mode
1889+
Aesara compilation mode, default=None.
1890+
point_fn : bool
18831891
Whether to wrap the compiled function in a PointFunc, which takes a Point
18841892
dictionary with model variable names and values as input.
1893+
model : Model, optional
1894+
Current model on stack.
1895+
18851896
Returns
18861897
-------
18871898
Compiled Aesara function as point function.

0 commit comments

Comments
 (0)