-
Notifications
You must be signed in to change notification settings - Fork 311
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
Prevent array shape mismatch due to NumPy squeeze in mhd_waves_.py
#2715
Conversation
Thank you for submitting a pull request (PR) to PlasmaPy! ✨ The future of the project depends on contributors like you, so we deeply appreciate it! 🌱 Our contributor guide has information on:
Important PlasmaPy recently switched to an The bottom of this page shows several checks that are run for every PR. Don't worry if something broke! We break stuff all the time. 😺 Click on "Details" to learn why a check didn't pass. Please also feel free to ask for help. We do that all the time as well. 🌸 You can find us in our chat room or weekly community meeting & office hours. Here are some tips:
If this PR is marked as ready for review, someone should stop by to provide a code review and offer suggestions soon. ✅ If you don't get a review within a few days, please feel free to send us a reminder. Please also use SI units within PlasmaPy, except when there is strong justification otherwise or in some examples. We thank you once again! |
mhd_waves_.py
mhd_waves_.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this, and apologies for the delay in merging it!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2715 +/- ##
==========================================
- Coverage 95.14% 94.36% -0.78%
==========================================
Files 107 107
Lines 9411 9608 +197
Branches 2168 2225 +57
==========================================
+ Hits 8954 9067 +113
- Misses 276 347 +71
- Partials 181 194 +13 ☔ View full report in Codecov by Sentry. |
Description
This PR adds an if statement to prevent array shape mismatch due to
np.squeeze
inmhd_waves_.py
.np.squeeze
will convert column vectors to row vectors, for example, which causes problems where the array shape is assumed to be preserved.