Skip to content

Commit 632b884

Browse files
reformat combine_args example
Co-authored-by: Dion Häfner <[email protected]>
1 parent 3066299 commit 632b884

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tesseract_jax/tesseract_compat.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ def combine_args(args0: Sequence, args1: Sequence, mask: Sequence[bool]) -> tupl
2020
`combine_args` will populate the new list according to the mask: if the mask evaluates
2121
to `False` it will take the next item of the first list, if it evaluate to `True` it will
2222
take from the second list.
23-
For example, merging the lists ["foo", "bar"] and [0, 1, 2] wih the mask [1, 0, 0, 1, 1]
24-
will return [0, "foo", "bar", 1, 2]
23+
24+
Example:
25+
>>> combine_args(["foo", "bar"], [0, 1, 2], [1, 0, 0, 1, 1])
26+
[0, "foo", "bar", 1, 2]
2527
"""
2628
assert sum(mask) == len(args1) and len(mask) - sum(mask) == len(args0)
2729
args0_iter, args1_iter = iter(args0), iter(args1)

0 commit comments

Comments
 (0)