Skip to content

Commit

Permalink
Fix zeros counting v2
Browse files Browse the repository at this point in the history
  • Loading branch information
pmc4 committed Dec 18, 2023
1 parent a451d75 commit 9b85825
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helper_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function fill_zeros_bins(real_xs, xs, ys, atol; zero_threshold::Real = 0.0)
# might be too high
number_of_zeros = count(x -> x == zero(x), real_ys)
number_of_zeros_in_ys = count(x -> x == zero(x), ys)
if ! (number_of_zeros == length(real_xs) - length(ys) - number_of_zeros_in_ys)
if ! (number_of_zeros - number_of_zeros_in_ys == length(real_xs) - length(ys))
warn_message = """Expected to write $(length(real_xs) - length(ys)) zeros, but $number_of_zeros were written.
Consider increasing the value of `atol` to fix this issue."""
@warn warn_message
Expand Down

0 comments on commit 9b85825

Please sign in to comment.