Skip to content

Chop datafunc needs chop interval #112

Open
@jeffwu78

Description

@jeffwu78

The chop datafunc has access to the old interval and whether it is a lower or upper chop, but it does not have access to the requested chop interval. This seems like a major oversight. Am I missing something?

To clarify, in the example given the documentation

def datafunc(iv, islower):
... oldlimit = iv[islower]
... return "oldlimit: {0}, islower: {1}".format(oldlimit, islower)
t = IntervalTree([Interval(0, 10)])
t.chop(3, 7, datafunc)

datafunc is given access to the old interval (0, 10), but not the actual chop interval (3, 7).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions