We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e3631a commit 7b421d0Copy full SHA for 7b421d0
src/methods.jl
@@ -15,10 +15,10 @@ function sanitize(var; replace_invalid=true, kwargs...)
15
if replace_invalid
16
vmins = valid_min(var)
17
vmaxs = valid_max(var)
18
- # Apply filtering per column for each value in vmins/vmaxs
19
- for i in eachindex(vmins)
20
- vmin = vmins[i]
21
- vmax = vmaxs[i]
+ # Apply filtering per column with matching vmins/vmaxs values (Handle case where vmins/vmaxs contain only one value)
+ for i in eachindex(size(v, 2))
+ vmin = @something get(vmins, i, nothing) only(vmins)
+ vmax = @something get(vmaxs, i, nothing) only(vmaxs)
22
v[(v[:, i].<vmin).|(v[:, i].>vmax), i] .= NaN
23
end
24
0 commit comments