You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was about to make a PR for consideration, when I realized there are quite a few reduction methods that could benefit from this: sum, prod, minimum, maximum, extrema. Instead of writing a specialization of all of them, it would be possible to write a specialization of mapreduce with some helper functions that provide basic facts that repeated + is * and repeated * is ^ and repeated min/max is Identity.
Then I also figured there could be definitions that specialize on scalar--PaddedView broadcasting operations, which would preserve the padding structure. This would be a breaking change, since the return type of e.g. padded_array .== 2 would change from OffsetArray to PaddedView.
It seemed a bit never-ending to encode all the rules, but I imagine at least some of these are worthwhile, so I opened this issue for discussion.
The text was updated successfully, but these errors were encountered:
goretkin
added a commit
to goretkin/PaddedViews.jl
that referenced
this issue
Apr 21, 2020
For my own code, I've defined:
I was about to make a PR for consideration, when I realized there are quite a few reduction methods that could benefit from this:
sum
,prod
,minimum
,maximum
,extrema
. Instead of writing a specialization of all of them, it would be possible to write a specialization ofmapreduce
with some helper functions that provide basic facts that repeated + is * and repeated * is ^ and repeated min/max is Identity.Then I also figured there could be definitions that specialize on scalar--
PaddedView
broadcasting operations, which would preserve the padding structure. This would be a breaking change, since the return type of e.g.padded_array .== 2
would change fromOffsetArray
toPaddedView
.It seemed a bit never-ending to encode all the rules, but I imagine at least some of these are worthwhile, so I opened this issue for discussion.
The text was updated successfully, but these errors were encountered: