cli
parse_shape(value)
Parse a shape argument into a tuple of integers.
This function takes a string representing shape dimensions. If the input is a single value, it is duplicated to form a tuple of length two. If multiple values are provided, they are converted into a tuple.
Args: value: A string containing one or more integers separated by commas, representing shape dimensions.
Returns: A tuple of two integers derived from the input string.
Examples: parse_shape("5") returns (5, 5) parse_shape("5,6") returns (5, 6)
Source code in preprocess_toolbox/cli.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
process_split_args(args, frequency)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
object
|
|
required |
frequency
|
Frequency
|
|
required |
Returns:
| Type | Description |
|---|---|
dict
|
|
Source code in preprocess_toolbox/cli.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |