GroupBase.get#
- GroupBase.get(src: str, idx, attr: str = 'v', allow_none=False, default=0.0)[source]#
Based on the indexer, get the attr field of the src parameter or variable.
- Parameters:
- srcstr
param or var name
- idxarray-like
device idx
- attr
The attribute of the param or var to retrieve
- allow_nonebool
True to allow None values in the indexer
- defaultfloat
If allow_none is true, the default value to use for None indexer.
- Returns:
- The requested param or variable attribute. If idx is a list, return a list of values.
- If idx is a single element, return a single value.