Skip to content

Commit

Permalink
try argmax
Browse files Browse the repository at this point in the history
  • Loading branch information
szy21 committed Jul 9, 2024
1 parent 2e341cb commit c2aa93a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/callbacks/callbacks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ function set_aerosol_type(::Type{FT};
OC2 = FT(0),
_...,
) where{FT}
_, index = findmax((DST01, SSLT01, SO4, CB1, CB2, OC1, OC2))
#index = argmax(Base.Fix1(getindex, (DST01, SSLT01, SO4, CB1, CB2, OC1, OC2)), 1:7)
#_, index = findmax((DST01, SSLT01, SO4, CB1, CB2, OC1, OC2))
index = argmax(Base.Fix1(getindex, (DST01, SSLT01, SO4, CB1, CB2, OC1, OC2)), 1:7)
return index
end
set_aerosol_type(nt) = set_aerosol_type(eltype(nt); nt...)
Expand Down

0 comments on commit c2aa93a

Please sign in to comment.