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 1D quiver when transforming projections #674

Closed
wants to merge 1 commit into from

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Sep 14, 2015

Maybe we should just use np.broadcast_arrays and check if the result is 2D?

Fix #672

@ajdawson
Copy link
Member

This PR needs a better description/title. It'd also help if the reference to the issue it fixes is in the description as it would be clickable and generate a reference.

@pelson
Copy link
Member

pelson commented Sep 15, 2015

Also, maybe just a test which ensures that the exception doesn't get raised (and the appropriate things are passed to quiver)?

@ocefpaf ocefpaf changed the title Fix #672 Fix 1D quiver in non-PlateCarree projections Sep 15, 2015
@ocefpaf
Copy link
Member Author

ocefpaf commented Sep 15, 2015

This PR needs a better description/title. It'd also help if the reference to the issue it fixes is in the description as it would be clickable and generate a reference.

Done!

Also, maybe just a test which ensures that the exception doesn't get raised (and the appropriate things are passed to quiver)?

Will do. I just wonder if we should use np.broadcast_arrays to ensure the arrays are in a consistent shape and let both np.broadcast_arrays and matplolib quiver do the raising and testing...

@ocefpaf ocefpaf changed the title Fix 1D quiver in non-PlateCarree projections Fix 1D quiver when transforming projections Sep 15, 2015
@ocefpaf ocefpaf force-pushed the fix_1D_quiver branch 3 times, most recently from a2b9dd7 to 2511b7b Compare September 15, 2015 15:04
@ocefpaf
Copy link
Member Author

ocefpaf commented Sep 15, 2015

@pelson I am not sure where these test should live so I added a new file. Let me know if I must paste them somewhere else.

PS: I notice that the test test_quiver_transform_xy_2d_uv_1d passes in the non-transform case. Even though the data is OK to be quiver'ed, see here, I do not believe we should cover every corner case and encourage user to pass 2D x, y with 1D u,v. What do you say?

@ocefpaf
Copy link
Member Author

ocefpaf commented Sep 16, 2015

Closed in favor of #677.

@ocefpaf ocefpaf closed this Sep 16, 2015
@ocefpaf ocefpaf deleted the fix_1D_quiver branch September 16, 2015 11:00
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

4 participants