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 x, y order with numpy.mgrid usage #2121

Merged
merged 1 commit into from
Feb 26, 2014
Merged

Conversation

cdeil
Copy link
Member

@cdeil cdeil commented Feb 22, 2014

As discussed in #2038 with @larrybradley and illustrated here, the correct way to use np.mgrid to create coordinate arrays x and y is y, x = np.mgrid[0:100, 0:200].
For np.meshgrid it is X, Y = np.meshgrid(x, y) for the default indexing='xy' order.

This PR fixes a few cases in the modeling tests and docs where the wrong order was used.

@astrofrog
Copy link
Member

Great - thanks for fixing this!

@cdeil
Copy link
Member Author

cdeil commented Feb 26, 2014

Ready to merge?

@astrofrog astrofrog added this to the v0.3.2 milestone Feb 26, 2014
@astrofrog
Copy link
Member

I think this needs an entry in the changelog, especially if it has the potential to change modeling results. Also, this will need a new 0.3.2 section for the changelog (since we have 'frozen' 0.3.1).

@cdeil
Copy link
Member Author

cdeil commented Feb 26, 2014

Does this really need a change log entry?
(Note that all changes are in examples and creating test data ... there actually was no bug or any change in results for users.)

@astrofrog
Copy link
Member

@cdeil - ah I see, I misunderstood. In that case, I agree that no entry is needed.

cc @embray

astrofrog added a commit that referenced this pull request Feb 26, 2014
Fix x, y order with numpy.mgrid usage
@astrofrog astrofrog merged commit 5a030d5 into astropy:master Feb 26, 2014
astrofrog added a commit that referenced this pull request Mar 27, 2014
Fix x, y order with numpy.mgrid usage
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