-
Notifications
You must be signed in to change notification settings - Fork 89
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
add prod #385
Conversation
Codecov Report
@@ Coverage Diff @@
## master #385 +/- ##
=======================================
Coverage 97.80% 97.80%
=======================================
Files 20 20
Lines 1547 1552 +5
=======================================
+ Hits 1513 1518 +5
Misses 34 34
Continue to review full report at Codecov.
|
test_rrule(prod, randn(5)) | ||
test_rrule(prod, randn(5, 6)) | ||
test_rrule(prod, randn(5, 6); fkwargs=(;dims=2)) | ||
test_rrule(prod, randn(5, 6); fkwargs=(;dims=1)) |
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.
Needs complex tests as well
#### prod | ||
#### | ||
|
||
function rrule(::typeof(prod), x::AbstractArray{T}; dims=:) where {T<:CommutativeMulNumber} |
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.
Would you consider restricting the type of x
to a subtype of AbstractArrays
?
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 just matched sum
I am happy to restrict to whatever
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.
Given that we've not tied this down, I propose StridedArray
.
Can you comment on how this is relates to #335? Does this cover the same cases? |
Yep the following fails:
Closing this infavor of #335 |
I wanted to see if it was as simple as i thought it would be.
The answer is yes.