Skip to content

Commit

Permalink
return index, not value
Browse files Browse the repository at this point in the history
fix incorrect usage of argmin
  • Loading branch information
wheeheee committed Nov 29, 2023
1 parent f9cfd28 commit 49d9600
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Filters/coefficients.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function groupzp(z, p)
i = 1
while i <= n
p_i = p[i]
closest_zero_idx = argmin(x -> abs(x - p_i), z)
_, closest_zero_idx = findmin(x -> abs(x - p_i), z)
groupedz[i] = splice!(z, closest_zero_idx)
if !isreal(groupedz[i])
i += 1
Expand Down

0 comments on commit 49d9600

Please sign in to comment.