Skip to content

Commit 2845bac

Browse files
committed
Fix docstrings and typehints
1 parent b189375 commit 2845bac

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

bayesflow/utils/dict_utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ def dicts_to_arrays(
282282
Ground-truth values corresponding to the estimates. Must match the structure and dimensionality
283283
of `estimates` in terms of first and last axis.
284284
285+
priors : dict[str, ndarray] or ndarray, optional (default = None)
286+
Prior draws. Must match the structure and dimensionality
287+
of `estimates` in terms of first and last axis.
288+
285289
dataset_ids : Sequence of integers indexing the datasets to select (default = None).
286290
By default, use all datasets.
287291

bayesflow/utils/plot_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def prepare_plot_data(
2323
figsize: tuple = None,
2424
stacked: bool = False,
2525
default_name: str = "v",
26-
) -> Mapping[str, Any]:
26+
) -> dict[str, Any]:
2727
"""
2828
Procedural wrapper that encompasses all preprocessing steps, including shape-checking, parameter name
2929
generation, layout configuration, figure initialization, and collapsing of axes.
@@ -56,6 +56,12 @@ def prepare_plot_data(
5656
Whether the plots are stacked horizontally
5757
default_name : str, optional (default = "v")
5858
The default name to use for estimates if None provided
59+
60+
Returns
61+
-------
62+
plot_data : dict[str, Any]
63+
A dictionary containing all preprocessed data and plotting objects required for visualization,
64+
including estimates, targets, variable names, figure, axes, and layout configuration.
5965
"""
6066

6167
plot_data = dicts_to_arrays(

0 commit comments

Comments
 (0)