striplog/striplog.py
def merge_overlaps(self):
        """
        Merges overlaps by merging overlapping Intervals.

        The function takes no arguments and returns ``None``. It operates on
        the striplog 'in place'

        TODO: This function will not work if any interval overlaps more than
            one other intervals at either its base or top.
        """
        overlaps = np.array(self.find_overlaps(index=True))

        if not overlaps.any():
            return

        for overlap in overlaps:
            before = self[overlap].copy()
            after = self[overlap + 1].copy()

            # Get rid of the before and after pieces.
            del self[overlap]
            del self[overlap]

            # Make the new piece.
            new_segment = before.merge(after)

            # Insert it.
            self.__insert(overlap, new_segment)

            overlaps += 1

        return
def merge_overlaps(self):
        overlaps = np.array(self.find_overlaps(index=True))

        if not overlaps.any():
            return

        for overlap in overlaps:
            before = self[overlap].copy()
            after = self[overlap + 1].copy()

            # Get rid of the before and after pieces.
            del self[overlap]
            del self[overlap]

            # Make the new piece.
            new_segment = before.merge(after)

            # Insert it.
            self.__insert(overlap, new_segment)

            overlaps += 1

        return
def merge_overlaps ( self ) : overlaps = np . array ( self . find_overlaps ( index = True ) ) if not overlaps . any ( ) : return for overlap in overlaps : before = self [ overlap ] . copy ( ) after = self [ overlap + 1 ] . copy ( ) # Get rid of the before and after pieces. del self [ overlap ] del self [ overlap ] # Make the new piece. new_segment = before . merge ( after ) # Insert it. self . __insert ( overlap , new_segment ) overlaps += 1 return
Merges overlaps by merging overlapping Intervals.

        The function takes no arguments and returns ``None``. It operates on
        the striplog 'in place'

        TODO: This function will not work if any interval overlaps more than
            one other intervals at either its base or top.
Merges overlaps by merging overlapping Intervals .