param.parameterized.Parameters.values#
- Parameters.values(onlychanged: bool = False) dict[str, Any][source]#
Retrieve a dictionary of parameter names and their current values.
- Parameters:
onlychanged (bool, optional) – If
True, only parameters with values different from their defaults are included (applicable only to instances). Default isFalse.- Returns:
A dictionary containing parameter names as keys and their current values as values.
- Return type:
Examples
>>> import param >>> class P(param.Parameterized): ... a = param.Number(default=0) ... b = param.String(default="hello") >>> p = P(a=10)
Get all parameter values:
>>> p.param.values() {'a': 10, 'b': 'hello', 'name': 'P...'}
Get only changed parameter values:
>>> p.param.values(onlychanged=True) {'a': 10}