Skip to content

feature request findmax(A,dims) #6716

Closed

Description

getting the maximum and its location in one pass is very useful. at current it's not supported along dimension d of an array.

A = rand(3,3,3)
now = mapslices(findmax,A,3)
#or
for i in 1:3
    for j in 1:3
         now[i,j] = findmax(A[i,j,:])
    end
end
then = findmax(A,3)

it's odd to have

max(A,dims)

and not findmax(A,dims)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions