arcfish.tl.overlap#

arcfish.tl.overlap(ints1: ndarray, ints2: ndarray, offset: float = 0) ndarray#

Given two list of intervals, for each interval in the first list, check if it overlaps with any interval from the second list. If offset is not 0, overlap is defined as within offset length away from each other.

Parameters:
  • ints1 ((n1, 2) np.ndarray) – A list of intervals. First column is the left end, and the second column is the right end of the interval.

  • ints2 ((n2, 2) np.ndarray) – A list of intervals. Same format as ints1.

  • offset (float, optional) – How to define overlapped intervals, by default 0.

Returns:

Whether each interval in the first list overlaps with intervals from the second list.

Return type:

(n1) np.ndarray