eelbrain.Categorial

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

Simple categorial dimension

Parameters:
  • name (str) – Dimension name.

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

  • adjacency (AdjacencyArg) –

    Adjacency 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'], adjacency=[('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

adjacency()

Retrieve the dimension's adjacency 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