Table Of Contents

Previous topic

mvpa.misc

Next topic

mvpa.misc.bv

This Page

Quick search

mvpa.misc.args

Helpers for arguments handling.

The comprehensive API documentation for this module, including all technical details, is available in the Epydoc-generated API reference for mvpa.misc.args (for developers).

Functions

mvpa.misc.args.group_kwargs(prefixes, assign=False, passthrough=False)

Decorator function to join parts of kwargs together

Parameters:
  • prefixes (list of basestrings) – Prefixes to split based on. See split_kwargs
  • assign (bool) – Flag to assign the obtained arguments to self._<prefix>_kwargs
  • passthrough (bool) – Flag to pass joined arguments as <prefix>_kwargs argument. Usually it is sufficient to have either assign or passthrough. If none of those is True, decorator simply filters out mentioned groups from being passed to the method

Example: if needed to join all args which start with ‘slave_‘ together under slave_kwargs parameter

See also

Full API documentation of group_kwargs() in module mvpa.misc.args.

mvpa.misc.args.split_kwargs(kwargs, prefixes=[])

Helper to separate kwargs into multiple groups

Parameters:
  • prefixes (list of basestrings) – Each entry sets a prefix which puts entry with key starting with it into a separate group. Group ‘’ corresponds to ‘leftovers’
Output:

dictionary with keys == prefixes

See also

Full API documentation of split_kwargs() in module mvpa.misc.args.