-
-
Notifications
You must be signed in to change notification settings - Fork 38
Fix unitful 3-arg *
#1499
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
base: master
Are you sure you want to change the base?
Fix unitful 3-arg *
#1499
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1499 +/- ##
==========================================
- Coverage 93.93% 93.92% -0.01%
==========================================
Files 34 34
Lines 15982 15983 +1
==========================================
Hits 15012 15012
- Misses 970 971 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| end | ||
| end | ||
| iszero(alpha) && return C | ||
| (iszero(alpha) || isempty(A) || isempty(B)) && return C |
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 don't see why this is related. Appears safe, given that we've already dealt with beta!=0 above.
But I'm confused about the case of nonzero beta and non-empty A,B in code just above. It seems that this code does C .*= beta, but then ignores A, B? Maybe I'm missing something. Not new to this PR. Haven't looked at tests for this.
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.
Yes, in that part it does C .*= beta. If iszero(alpha), then this is all that needs to be done in
C = A*B*alpha + C*betaThis change is unrelated, it just avoids "running empty loops" in the sequel.
Fixes #1291.