From daaf0ec14aba1e19fe0515e1dac4ebfc467c5697 Mon Sep 17 00:00:00 2001 From: Nic Ma Date: Wed, 12 Jan 2022 18:10:46 +0800 Subject: [PATCH] [DLMED] add missing doc-string Signed-off-by: Nic Ma --- monai/transforms/compose.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/monai/transforms/compose.py b/monai/transforms/compose.py index 165d9b732f..b4b0e2af43 100644 --- a/monai/transforms/compose.py +++ b/monai/transforms/compose.py @@ -100,6 +100,14 @@ class Compose(Randomizable, InvertibleTransform): Alternatively, one can create a class with a `__call__` function that calls your pre-processing functions taking into account that not all of them are called on the labels. + + Args: + transforms: sequence of callables. + map_items: whether to apply transform to each item in the input `data` if `data` is a list or tuple. + defaults to `True`. + unpack_items: whether to unpack input `data` with `*` as parameters for the callable function of transform. + defaults to `False`. + """ def __init__( @@ -180,9 +188,11 @@ class OneOf(Compose): transforms: sequence of callables. weights: probabilities corresponding to each callable in transforms. Probabilities are normalized to sum to one. + map_items: whether to apply transform to each item in the input `data` if `data` is a list or tuple. + defaults to `True`. + unpack_items: whether to unpack input `data` with `*` as parameters for the callable function of transform. + defaults to `False`. - ``OneOf`` inherits from ``Compose`` and uses args ``map_items`` and ``unpack_items`` in - the same way. """ def __init__(