eelbrain.Case
- class eelbrain.Case(n, connectivity='none')
Case dimension
- Parameters
n (int) – Number of cases.
connectivity ('grid' | 'none' | array of int, (n_edges, 2)) – Connectivity between elements. Set to
"none"
for no connections or"grid"
to use adjacency in the sequence of elements as connection. Set tonumpy.ndarray
to specify custom connectivity. The array should be of shape (n_edges, 2), and each row should specify one connection [i, j] with i < j, with rows sorted in ascending order. If the array’s dtype is uint32, property checks are disabled to improve efficiency.
Examples
When initializing an
NDVar
, the case dimension can be speciied with the bare class and the number of cases will be inferred from the data:>>> NDVar([[1, 2], [3, 4]], (Case, Categorial('column', ['1', '2']))) <NDVar: 2 case, 2 column>
Methods
Retrieve the dimension's connectivity graph |
|
|
Convert a dimension index to an array index |
|
Index into a subset dimension |
|
Create a Dimension that is the intersection with dim |