Skip to content

Deprecate dims methods for iterator forms? #35292

@ChrisRackauckas

Description

@ChrisRackauckas

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    foldsum, maximum, reduce, foldl, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions