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

fix bug in tick assignment for get_array_metadata #1487

Merged
merged 1 commit into from
Feb 3, 2021

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Jan 30, 2021

Fixes #1484.

#1456 changed the default behavior of get_array_metadata by collapsing all empty directions of the array slice. This change unfortunately created a bug in the tick assignment of the collapsed directions: e.g., for a 1d slice with mp.Volume(center=mp.Vector3(1.5,0),size=mp.Vector3(0,5.5)), the x ticks were being set to 0 which is incorrect and are now set to 1.5.

A separate PR will add a test for the FourierFields class of the adjoint solver which also includes a test for this feature of get_array_metadata (which had been missing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistency between adjoint gradients and finite differences
2 participants