eelbrain.Factor.matches

Factor.matches(pattern)

An index that is true for all cases whose name matches pattern

Parameters:

pattern (str) – fnmatch pattern for selecting cells.

Returns:

Index that is True for all cases whose label matches pattern.

Return type:

index

See also

startswith, endswith

Examples

>>> a = Factor(['a1', 'a2', 'b1', 'b2'])
>>> a.matches('b*')
array([False, False,  True,  True], dtype=bool)