Skip to content

Commit 3e30aa5

Browse files
committed
adapt signature of Adapter.standardize
1 parent f5fba59 commit 3e30aa5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

bayesflow/adapters/adapter.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,8 @@ def standardize(
813813
self,
814814
include: str | Sequence[str] = None,
815815
*,
816+
mean: int | float | np.ndarray,
817+
std: int | float | np.ndarray,
816818
predicate: Predicate = None,
817819
exclude: str | Sequence[str] = None,
818820
**kwargs,
@@ -821,10 +823,14 @@ def standardize(
821823
822824
Parameters
823825
----------
824-
predicate : Predicate, optional
825-
Function that indicates which variables should be transformed.
826826
include : str or Sequence of str, optional
827827
Names of variables to include in the transform.
828+
mean : int or float
829+
Specifies the mean (location) of the transform.
830+
std : int or float
831+
Specifies the standard deviation (scale) of the transform.
832+
predicate : Predicate, optional
833+
Function that indicates which variables should be transformed.
828834
exclude : str or Sequence of str, optional
829835
Names of variables to exclude from the transform.
830836
**kwargs :

bayesflow/adapters/transforms/standardize.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ class Standardize(ElementwiseTransform):
2525
2626
Examples
2727
--------
28-
>>> adapter = (
29-
bf.adapters.Adapter().standardize(include="beta", mean=5, std=10)
28+
>>> adapter = bf.Adapter().standardize(include="beta", mean=5, std=10)
3029
"""
3130

3231
def __init__(

0 commit comments

Comments
 (0)