class eelbrain.Categorial(name, values, connectivity='none')

Simple categorial dimension

  • name (str) – Dimension name.

  • values (sequence of str) – Names of the entries.

  • connectivity (str | list of (str, str) | array of int, (n_edges, 2)) –

    Connectivity between elements. Can be specified as:

    • "none" for no connections

    • "grid" to use adjacency in values

    • list of connections based on items in values (e.g., values=['v1', 'v2', 'v3'], connectivity=[('v1', 'v3'), ('v2', 'v3'), ...])

    • numpy.ndarray of int, shape (n_edges, 2), to specify connections in terms of indices. Each row should specify one connection [i, j] with i < j. If the array’s dtype is uint32, property checks are disabled to improve efficiency.



Retrieve the dimension's connectivity graph


Convert a dimension index to an array index


Index into a subset dimension

intersect(dim[, check_dims])

Create a dimension object that is the intersection with dim