JuliaImages / ImageFiltering.jl

Julia implementations of multidimensional array convolution and nonlinear stencil operations
Other
99 stars 49 forks source link

bug in similar() for BorderArrays #137

Closed Cody-G closed 4 years ago

Cody-G commented 4 years ago

I came across this when trying to compose BorderArrays to set a different fill value for the front and back of the array. Code to demonstrate:

using ImageFiltering

b_front = BorderArray(zeros(10), Fill(1.0, (3,), (0,)))
b_both = BorderArray(b_front, Fill(1.0, (0,), (5,)))
b_sim = similar(b_both)
axes(b_sim) == axes(b_both)  # is false, should be true

I'll make a PR shortly

jw3126 commented 4 years ago

Fixed by #138