reservoirflow.utils.helpers.reformat#
- reservoirflow.utils.helpers.reformat(in_data, fmt='tuple')#
Reformat input data.
- Parameters:
in_data (_type_) – input data to be reformated. If data is np.ndarray, it must be flatten before reformated.
points (bool, optional) – _description_
fmt (str, optional) – output format as str from [‘array’, ‘list’, ‘tuple’, ‘set’]. For a better performance, use ‘set’ to check if an item is in a list or not. Use tuples to iterate through items. When option ‘array’ is used, utils.isin() must be used to check if a tuple of 3 is in the array.
- Returns:
iterable format of data based on fmt argument.
- Return type:
list, tuple, set, array, dict
- Raises:
ValueError – fmt is unknown.