Skip to content

Commit d5cd2ce

Browse files
committed
FIX: csr_array any
1 parent bdf3396 commit d5cd2ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mne/label.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3087,7 +3087,7 @@ def label_adjacency(labels, src):
30873087

30883088
# Get adjacent vertices if any.
30893089
adj_verts = src_adjacency[label_src_ind[ind1], :][:, label_src_ind[ind2]]
3090-
if adj_verts.any():
3090+
if adj_verts.data.any():
30913091
adjacent_label_inds.append((ind1, ind2))
30923092
return coo_matrix(
30933093
(np.ones(len(adjacent_label_inds)), tuple(zip(*adjacent_label_inds))),
@@ -3156,7 +3156,7 @@ def volume_label_adjacency(src, subject, subjects_dir, *, aseg="auto", labels=No
31563156
for ind2, verts2 in enumerate(label_verts):
31573157
# Get adjacent vertices if any.
31583158
adj_verts = src_adjacency[verts1, :][:, verts2]
3159-
if adj_verts.any():
3159+
if adj_verts.data.any():
31603160
adjacent_label_inds.append((ind1, ind2))
31613161

31623162
adj = sparse.coo_matrix(

0 commit comments

Comments
 (0)