def _st_mask_from_s_inds(n_times, n_vertices, vertices, set_as=True):
 mask = np.zeros((n_times, n_vertices), dtype=bool)
 mask[:, vertices] = True
 mask = mask.ravel()
 if (set_as is False):
  mask = np.logical_not(mask)
 return mask

def _st_mask_from_s_inds ( n_times , n_vertices , vertices , set_as = True ) : mask = np . zeros ( ( n_times , n_vertices ) , dtype = bool ) mask [ : , vertices ] = True mask = mask . ravel ( ) if ( set_as is False ) : mask = np . logical_not ( mask ) return mask
compute mask to apply to a spatio-temporal connectivity matrix .