Return a dictionary that allows infinite nesting without having to define level by level.
Example
>>> import pybamm
>>> d = pybamm.get_infinite_nested_dict()
>>> d["a"] = 1
>>> d["a"]
1
>>> d["b"]["c"]["d"] = 2
>>> d["b"]["c"] == {"d": 2}
True
Get the git commit info for the current PyBaMM version, e.g. v22.8-39-gb25ce8c41 (version 22.8, commit b25ce8c41)
Calculate the root-mean-square-error between two vectors x and y, ignoring NaNs
Provides accurate timing.
Example
timer = pybamm.Timer() print(timer.time())
Load a python function from an absolute or relative path using importlib. Example - pybamm.load_function(“pybamm/input/example.py”)
filename (str) – The path of the file containing the function.
The python function loaded from the file.
function