pyphi.connectivity.subadjacency#
- pyphi.connectivity.subadjacency(cm, source, target=None)[source]#
Return the sub-adjacency matrix for two groups of nodes.
This gives the connections from the first group to the second group.
- Parameters:
- Return type:
Examples
>>> cm = np.identity(5) >>> subadjacency(cm, (2, 3)) array([[1., 0.], [0., 1.]]) >>> subadjacency(cm, (0, 1), (1, 2)) array([[0., 0.], [1., 0.]])