Skip to content

support multiple dimensions in reverse(A, dims=...) #37358

@stevengj

Description

@stevengj

Would be nice if you could pass a tuple for the dims keyword:

julia> A = rand(2,3)
2×3 Array{Float64,2}:
 0.909488  0.0318373  0.218921
 0.703028  0.361451   0.814981

julia> reverse(A, dims=(1,2)) # would be nice if this worked like reverse(reverse(A, dims=1), dims=2)
ERROR: TypeError: in keyword argument dims, expected Integer, got a value of type Tuple{Int64,Int64}
Stacktrace:
 [1] top-level scope at REPL[11]:1

You could also support dims=: to reverse all of the dimensions, and maybe make this the default. (Currently it is an error if you don't specify dims)

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrays[a, r, r, a, y, s]speculativeWhether the change will be implemented is speculative

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions