if ends is not None and len(ends):
if mode == "inner":
end_idxs = table.end.searchsorted(ends, "right")
else:
end_idxs = table.start.searchsorted(ends)
else:
end_idxs = np.repeat(len(table), len(starts))
After Change
if ends is not None and len(ends):
if mode == "inner":
end_idxs = tbl_end.searchsorted(ends, "right")
else:
end_idxs = table.start.searchsorted(ends)
else:
end_idxs = np.repeat(len(table), len(starts))