Utility functions#
- class pybamm.Timer[source]#
Provides accurate timing.
Example
timer = pybamm.Timer() print(timer.time())
- class pybamm.FuzzyDict[source]#
- copy()[source]#
Return a shallow copy of the FuzzyDict.
- Returns:
A new FuzzyDict object with the same keys and values as the original.
- Return type:
- search(keys: str | list[str], print_values: bool = False, min_similarity: float = 0.4)[source]#
Search dictionary for keys containing all terms in ‘keys’. If print_values is True, both the keys and values will be printed. Otherwise, just the keys will be printed. If no results are found, the best matches are printed.