Skip to content

Commit fe048f7

Browse files
committed
small change to keep
1 parent 638065d commit fe048f7

File tree

1 file changed

+2
-6
lines changed
  • bayesflow/adapters/transforms

1 file changed

+2
-6
lines changed

bayesflow/adapters/transforms/keep.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Keep(Transform):
1818
1919
cls: tuple containing the names of kept data variables as strings.
2020
21-
Example 1:
21+
Useage:
2222
2323
Two moons simulator generates data for priors alpha, r and theta as well as observation data x.
2424
We are interested only in theta and x, to keep only theta and x we should use the following;
@@ -28,11 +28,9 @@ class Keep(Transform):
2828
2929
# drop data from unneeded priors alpha, and r
3030
.keep(("theta", "x"))
31-
3231
)
3332
34-
Example 2:
35-
33+
Example:
3634
>>> a = [1,2,3,4]
3735
>>> b = [[1,2],[3,4]]
3836
>>> c = [[5,6,7,8]]
@@ -42,8 +40,6 @@ class Keep(Transform):
4240
>>> keeper.forward(dat)
4341
{'b': [[1, 2], [3, 4]], 'c': [[5, 6, 7, 8]]}
4442
45-
46-
4743
"""
4844
def __init__(self, keys: Sequence[str]):
4945
self.keys = keys

0 commit comments

Comments
 (0)