xsimlab.filter_variables(process, var_type=None, intent=None, group=None, func=None)

Filter the variables declared in a process.

  • process (object or class) – Process class or object.

  • var_type ({'variable', 'on_demand', 'foreign', 'group'}, optional) – Return only variables of a specified type.

  • intent ({'in', 'out', 'inout'}, optional) – Return only input, output or input/output variables.

  • group (str, optional) – Return only variables that belong to a given group.

  • func (callable, optional) – A callable that takes a variable (i.e., a attr.Attribute object) as input and return True or False. Useful for more advanced filtering.


attributes – A dictionary of variable names as keys and attr.Attribute objects as values.

Return type