diff --git a/src/extreme_filter.jl b/src/extreme_filter.jl index f7b79cb8..46b21a6b 100644 --- a/src/extreme_filter.jl +++ b/src/extreme_filter.jl @@ -349,7 +349,7 @@ function _extreme_filter_C4_2D!( #creating temporaries ySize, xSize = size(A) - tmp = Array{T,1}(undef, ySize) + tmp = similar(out, eltype(out), ySize) tmp2 = similar(tmp) # applying radius=r filter is equivalent to applying radius=1 filter r times