IntervalTree methods before/after are broken

Create issue
Issue #50 new
Alistair Miles created an issue

Where there are multiple results from a call to before() or after() or before_interval() or after_interval() on an IntervalTree, an exception is raised. See a notebook with minimal example.

I think it's a simple fix, when adding items to the results the object added should be the IntervalNode itself, not the associated object (self.interval) which could be an arbitrary object (and hence not have start or end fields). The problem is caused by the sort operation on the results list.

I'd be happy to add a test case and attempt a fix but I couldn't see an obvious place to add unit tests, and didn't know if the project is still active. Let me know what the best thing to do is.

Comments (0)

  1. Log in to comment