Check if all list representing multiple input sets have the same length and return it
(inputs)
| 85 | return 1 |
| 86 | |
| 87 | def _check_common_length(inputs): |
| 88 | """Check if all list representing multiple input sets have the same length and return it""" |
| 89 | arg_list_len = max(_safe_len(input) for input in inputs) |
| 90 | for input in inputs: |
| 91 | if isinstance(input, list): |
| 92 | if len(input) != arg_list_len: |
| 93 | raise ValueError( |
| 94 | f"All argument lists for Multiple Input Sets used " |
| 95 | f"with operator `{op_name}` must have " |
| 96 | f"the same length" |
| 97 | ) |
| 98 | return arg_list_len |
| 99 | |
| 100 | def _unify_lists(inputs, arg_list_len): |
| 101 | """Pack single _DataNodes into lists, so they are treated as Multiple Input Sets |
no test coverage detected