-
Notifications
You must be signed in to change notification settings - Fork 669
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
bug fixes in lib.distances #2083
bug fixes in lib.distances #2083
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2083 +/- ##
===========================================
+ Coverage 89.37% 89.41% +0.04%
===========================================
Files 159 159
Lines 18712 18731 +19
Branches 2684 2696 +12
===========================================
+ Hits 16724 16749 +25
+ Misses 1384 1381 -3
+ Partials 604 601 -3
Continue to review full report at Codecov.
|
This is not ready for review. Since I have to add tests for empty inputs to satisfy the diff coverage, I'll do that for all functions right away. |
@zemanj how/where were coordinates being modified in place? |
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.
Looks good, few comments would be nice
This happened when I introduced the new @check_coords() decorator. For some functions, I falsely assumed that they either make copies of (or only read from) the input arrays internally. I fixed the problem by removing the |
@richardjgowers I added the requested comments. Moreover, I removed the obsolete dtype conversion in the return statements of |
@richardjgowers Do you want to take another look or shall I merge? |
@richardjgowers Thank you for reviewing! |
Fixes (partially) #2046. This is the fourth of a series of related PRs following PRs #2048, #2062, and #2070.
Changes made in this Pull Request:
MDAnalysis.lib.distances
modifies its input coordinate arrays in-place. This fixes a bug I introduced in PR Simplified code inlib.distances
a bit #2048 (see updated issue MDAnalysis.lib.distances needs rework #2046).shape=(0,3)
) in alllib.distances
functions.*capped_distance()
in several corner cases.PR Checklist