-
Notifications
You must be signed in to change notification settings - Fork 38
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
sum for OneElement #375
sum for OneElement #375
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #375 +/- ##
=======================================
Coverage 99.90% 99.91%
=======================================
Files 8 8
Lines 1110 1112 +2
=======================================
+ Hits 1109 1111 +2
Misses 1 1 ☔ View full report in Codecov by Sentry. |
91d36cb
to
331c746
Compare
We also want to support dims keyword but should we be overloading mapreduce directly? |
In principle, we should be specializing |
I do think we should support Or at the very least we need tests. Actually I suspect this has broken |
It might be necessary to overload |
I don't think this has broken julia> A = OneElement(3, 4);
julia> sum(A, dims=1) == sum(Array(A), dims=1)
true
julia> sum(A, dims=2) == sum(Array(A), dims=2)
true
julia> sum(A, dims=1:2) == sum(Array(A), dims=1:2)
true Is there anything in particular that you think is broken? Also, what type-stability were you referring to? Between the method without |
This computes the
sum
over aOneElement
in O(1). Along with the newFillMatrix
multiplication method, this also means that we don't need to specialize::AbstractFillMatrix * ::OneElementVector
anymore.