pybamm.get_infinite_nested_dict()[source]¶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
pybamm.load_function(filename)[source]¶Load a python function from a file “function_name.py” called “function_name”. The filename might either be an absolute path, in which case that specific file will be used, or the file will be searched for relative to PyBaMM root.
| Parameters: | filename (str) – The name of the file containing the function of the same name. |
|---|---|
| Returns: | The python function loaded from the file. |
| Return type: | function |