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

Bugfix for get_sample_local() #118

Merged
merged 5 commits into from
Sep 6, 2020
Merged

Conversation

pc494
Copy link
Member

@pc494 pc494 commented Sep 6, 2020

This code was incorrect, and was only able to pass testing as it return a size 0 grid in all cases. This PR corrects that bug and shores up the testing.

This bit of the API is now tested by two tests which:
(1) ~ Make sure the "width" argument scales as theory suggests. Making a grid twice as wide leads to a non-linear expansion (although for small widths this is very close to 2^3 = 8)

(2) ~ Make sure some obvious rotation are out (by size) and in (near the far end, but in)

(3) Makes sure the center argument obeys as expected. If width=x and the center is z, you expect all outputs to be within x of the rotation z.

@pc494 pc494 added the bug Something isn't working label Sep 6, 2020
@dnjohnstone dnjohnstone merged commit fdfe9a1 into pyxem:master Sep 6, 2020
@pc494 pc494 added this to the v0.5.0 milestone Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants