- eelbrain.set_connectivity(data, dim=None, connectivity='none', name=None)
Change the connectivity of an NDVar or a Dimension
data (Union[NDVar, Dimension]) – NDVar for which to change the connectivity.
dim (str) – Dimension for which to set the connectivity.
connectivity (Union[str, Sequence]) – Connectivity between elements. Set to
"none"for no connections or
"grid"to use adjacency in the sequence of elements as connection. Set to
numpy.ndarrayto 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.
name (str) – Name for the new NDVar (default is
Shallow copy of
datawith the new connectivity.
- Return type