firecrown.parameters.ParamsMap
- class firecrown.parameters.ParamsMap[source]
Bases:
Dict
[str
,float
]A specialized Dict in which all keys are strings and values are floats.
The recommended access method is get_from_prefix_param, rather than indexing with square brackets like x[].
Public Methods:
get_from_prefix_param
(prefix, param)Return the parameter identified by the optional prefix and parameter name.
Inherited from
dict
__repr__
()Return repr(self).
__getattribute__
(name, /)Return getattr(self, name).
__lt__
(value, /)Return self<value.
__le__
(value, /)Return self<=value.
__eq__
(value, /)Return self==value.
__ne__
(value, /)Return self!=value.
__gt__
(value, /)Return self>value.
__ge__
(value, /)Return self>=value.
__iter__
()Implement iter(self).
__init__
(*args, **kwargs)__or__
(value, /)Return self|value.
__ror__
(value, /)Return value|self.
__ior__
(value, /)Return self|=value.
__len__
()Return len(self).
__getitem__
x.__getitem__(y) <==> x[y]
__setitem__
(key, value, /)Set self[key] to value.
__delitem__
(key, /)Delete self[key].
__contains__
(key, /)True if the dictionary has the specified key, else False.
__sizeof__
()get
(key[, default])Return the value for key if key is in the dictionary, else default.
setdefault
(key[, default])Insert key with a value of default if key is not in the dictionary.
pop
(k[,d])If the key is not found, return the default if given; otherwise, raise a KeyError.
popitem
()Remove and return a (key, value) pair as a 2-tuple.
keys
()items
()values
()update
([E, ]**F)If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]
fromkeys
([value])Create a new dictionary with keys from iterable and values set to value.
clear
()copy
()__reversed__
()Return a reverse iterator over the dict keys.
__class_getitem__
See PEP 585
Inherited from
Generic
__class_getitem__
See PEP 585
__init_subclass__
(*args, **kwargs)This method is called when a class is subclassed.
- get_from_prefix_param(prefix, param)[source]
Return the parameter identified by the optional prefix and parameter name.
See parameter_get_full_name for rules on the forming of prefix and name. Raises a KeyError if the parameter is not found.
- Parameters
prefix (
Optional
[str
]) –param (
str
) –
- Return type
float