Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Remove unnecessary calls to np.array in examples.#16430
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
There's many places where explicit conversion to np.array is not necessary-- because matplotlib or numpy already handles the conversion, orbecause the variable is already an array. Removing these calls makesthe examples concentrate more on the plotting-relevant parts.
Codecov Report
@@ Coverage Diff @@## master #16430 +/- ##==========================================- Coverage 80.86% 74.85% -6.01%========================================== Files 307 276 -31 Lines 75749 68660 -7089 Branches 9692 9688 -4 ==========================================- Hits 61252 51395 -9857- Misses 11959 14909 +2950+ Partials 2538 2356 -182
Continue to review full report at Codecov.
|
@@ -30,7 +30,7 @@ | |||
]) | |||
x, y = np.dot(R,np.array([x, y])) | |||
x, y = np.dot(R, [x, y]) |
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.
x,y=np.dot(R,[x,y]) | |
x,y=R @[x,y] |
Simpler?
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.
I'd rather leave the dot -> @ for another time.
The travis OSX failure looks un-related (failure to read a png back in). |
There's many places where explicit conversion to np.array is not necessary
-- because matplotlib or numpy already handles the conversion, or
because the variable is already an array. Removing these calls makes
the examples concentrate more on the plotting-relevant parts.
PR Summary
PR Checklist