(x: Union[List, Tuple, Any], min_len: int = 1, idx_repeat: int = -1)
| 32 | |
| 33 | |
| 34 | def val2tuple(x: Union[List, Tuple, Any], min_len: int = 1, idx_repeat: int = -1): |
| 35 | # repeat elements if necessary |
| 36 | x = val2list(x) |
| 37 | if len(x) > 0: |
| 38 | x[idx_repeat:idx_repeat] = [x[idx_repeat] for _ in range(min_len - len(x))] |
| 39 | |
| 40 | return tuple(x) |
| 41 | |
| 42 | |
| 43 | def get_same_padding( |