-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
foldsum, maximum, reduce, foldl, etc.sum, maximum, reduce, foldl, etc.
Description
It seems like the dims
-based methods could be from another time. It seems that we now have a way to do this using iterators:
A = rand(4,4)
sum(A,dims=2)
sum(eachcol(A))
Could we make our APIs simpler by dropping the dims
-based versions and instead just requiring that the user uses an appropriate iterator before the call? One thing that would have to be true when doing this is that it should be just as efficient, so I wonder if @maleadt could comment on whether there's any extra optimizations on things like GPUs that are available in sum(A,dims=2)
vs sum(eachcol(A))
. Otherwise, it might be interesting to drop in a Julia 2.0?
(One note is that we'd need iterators on higher dimensions as well, though that could be done)
StefanKarpinski, nickrobinson251 and ararslan
Metadata
Metadata
Assignees
Labels
foldsum, maximum, reduce, foldl, etc.sum, maximum, reduce, foldl, etc.