# Identify all non-None indices
non_none_indices = np.where(differences != None)[0]
# Identify breaks in continuous sequences
breaks = np.where(np.diff(non_none_indices) != 1)[0] + 1
# Determine start and end indices for each window
starts = non_none_indices[np.insert(breaks, 0, 0)]
ends = non_none_indices[np.append(breaks - 1, len(non_none_indices) - 1)]
# Filter out windows where the start and end indices are the same
windows = np.column_stack((starts, ends))
windows = windows[windows[:, 0] != windows[:, 1]]