-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use pykdtree when available #1150
Conversation
Oh, actually, I think that
Most Docs are 2.5 minutes faster, so maybe we should add pykdtree on both builds? |
except TypeError: | ||
kdtree = scipy.spatial.cKDTree(xyz) | ||
_, indices = kdtree.query(target_xyz, k=1) | ||
mask = indices >= len(xyz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is there because we don't really care about the distance and pykdtree returns differing results for out-of-domain vs. nan storpipfugl/pykdtree#35
Use pykdtree on 'latest' for Travis, and for 3.6 for CircleCI.
Rebased; I enabled pykdtree on both doc builds because a) it's so much faster, and b) there's already checks for plain scipy on Travis. |
I don't see any reason why we wouldn't want to do this, so 👍 |
Rationale
The pykdtree project by @storpipfugl is super fast compared to scipy, so this tries to use it if it's available.
Implications
There is no effect on tests, but a great effect on the examples:
In almost all cases, the
imshow
is approximately half the time whiledraw
is slightly slower. For some reason, the draw ineyja_volcano
is much slower which I need to investigate a bit, but the real win here isgeostationary
which is two orders of magnitude faster.This speedup should hopefully improve doc builds a bit (at least where it was added.)