Skip to content
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

Test distance #368

Merged
merged 6 commits into from
Dec 14, 2022
Merged

Test distance #368

merged 6 commits into from
Dec 14, 2022

Conversation

nirvaank
Copy link
Contributor

Added test for distance.pairwise that checks if the ij_index output by distance.pairwise matches the corresponding entry in the distances output by distance.pairwise.


for index, ij in enumerate(ij_updown):
i, j = ij
assert (dupdown[:, index] == (configs2[:, j] - configs1[:, i])).all()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not use equality tests for floating point numbers. Please change to using (for example) np.isclose.

@lkwagner lkwagner merged commit c63c451 into WagnerGroup:master Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants