eelbrain.Categorial

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

Simple categorial dimension

Parameters:
  • name (str) – Dimension name.

  • values (Sequence[str]) – Names of the levels.

  • connectivity (ConnectivityArg) –

    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.

Methods

connectivity()

Retrieve the dimension's connectivity graph

dimindex(arg)

Convert a dimension index to an array index

index_into_dim(dim)

Index into a subset dimension

intersect(dim[, check_dims])

Create a dimension object that is the intersection with dim