Multivariate Pattern Analysis in Python

# mvpa2.generators.permutation.get_limit_filter

`mvpa2.generators.permutation.``get_limit_filter`(limit, collection)

  Create a filter array from a limit definition.

  Parameters:

  limit : None or str or dict

  > If `None` all elements will be included in the filter. If an single attribute name is given, its unique values will be used to define chunks of data that are marked in the filter as unique integers. Finally, if a dictionary is provided, its keys define attribute names and its values (single value or sequence thereof) attribute value, where all key-value combinations across all given items define a “selection” of elements to be included in the filter (OR combination).

  collection : Collection

  > Dataset attribute collection instance that contains all attributes referenced in the limit specification, as well as defines the shape of the filter.

  Returns:

  array

  > This array is either boolean, where a `True` elements represent including in the filter, or the array is numerical, where it unique integer values defines individual chunks of a filter.