`findmax` and friends: confusing behaviour to be introduced in 1.7

basically, given these four operations:

# in v1.7 beta
julia> a = [1,3,2];

julia> findmax(a) #1
(3, 2)

julia> findmax(inv, a) #2
(1.0, 1)

julia> argmax(a) #3
2

julia> argmax(inv, a) #4
1

we want to be able to get these pieces directly:

  1. the biggest value in the data (:white_check_mark:, #1)
  2. the index of 1. (:white_check_mark:, #1 or #3)
  3. the biggest evaluated value in data after evaluation. (:white_check_mark: , #2 )
  4. the index of 3. (:white_check_mark:, #2)
  5. the original value of 3. (:white_check_mark:, #4)

so I’m fine with this I guess.

2 Likes