landlab.core.model_parameter_loader¶
- load_params(file_like)[source]¶
Load parameters from a YAML style file.
- Parameters:
file_like (file_like or str) – Contents of a parameter file, a file-like object, or the path to a parameter file.
- Returns:
Parameters as key-value pairs.
- Return type:
Examples
>>> from landlab.core import load_params >>> contents = ''' ... start: 0. ... stop: 10. ... step: 2. ... ''' >>> params = load_params(contents) >>> isinstance(params, dict) True >>> params["start"], params["stop"], params["step"] (0.0, 10.0, 2.0)