mechmat.core package¶
Submodules¶
mechmat.core.chainable module¶
-
class
mechmat.core.chainable.
Chainable
(**kwargs)[source]¶ Bases:
object
” A linked attribute class
-
link_attr
(attr, transform, **kwargs)[source]¶ Link a Linked attribute against another Linked attribute.
- Args:
attr (str): Attribute name transform: The function which provides the transform. **kwargs: the transform function keywords where the value is either a str (if the attribute can be obtained
from the own instance) or a tuple containing the other instance and attribute name.
-
set_guard
(attr, unit=None, rng=None, doc=None)[source]¶ Set the guard descriptor unit and range, this is usually set in the __init__() function
- Args:
attr (str): The guard attribute to be set unit (ureg.Unit): The unit in which guarded inputs are to be converted rng (tuple, list, np.array): The range [low, high] against which to test doc (str): dosctring
-