hpcflow.sdk.core.utils.remap#
- hpcflow.sdk.core.utils.remap(lst: list[int], mapping_func: Callable[[Sequence[int]], Sequence[T]]) list[T] #
- hpcflow.sdk.core.utils.remap(lst: list[list[int]], mapping_func: Callable[[Sequence[int]], Sequence[T]]) list[list[T]]
- hpcflow.sdk.core.utils.remap(lst: list[list[list[int]]], mapping_func: Callable[[Sequence[int]], Sequence[T]]) list[list[list[T]]]
Apply a mapping to a structure of lists with ints (typically indices) as leaves to get a structure of lists with some objects as leaves.
- Parameters:
- Returns:
Nested list structure in same form as input, with leaves remapped.
- Return type: