my working, but 10x slower algorithm, which I am going to rewrite today.
np now supports up to 3 trees simulatenously, one built on x, one on y, and one on x+y
possible breakage caused by this
some more 3 trees tweaks
a new ccdf algorithm which in the worst case (many irrelevant variables) is the same order as the old one O(n^3) (but a constant factor slower), and in other cases approaches n^2 log(n).
it crashed when I tested it with ordered data
enable it with np.tree = TRUE, disable with np.tree = FALSE for comparison.