JuliaImages / ImageFiltering.jl

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

Nice display for ReshapedOneD #230

Closed timholy closed 2 years ago

timholy commented 2 years ago

While ReshapedOneD is not itself an AbstractArray (due to needing to handle IIR types too), it often contains one. In such cases, there are obvious mechanisms to improve the display.

With this PR, we get:

julia> kern1, kern2 = kernelfactors((centered([1, 2, 1]), [-1, 0, 1]));

julia> kern1
Reshaped 1d stencil with axes (-1:1, 0:0):
 1
 2
 1

julia> kern2
Reshaped 1d stencil with axes (0:0, 1:3):
 -1  0  1
timholy commented 2 years ago

CC @chriselrod xref https://github.com/JuliaSIMD/LoopVectorization.jl/issues/342#issuecomment-927299004

codecov[bot] commented 2 years ago

Codecov Report

Merging #230 (22f8aa0) into master (6b51789) will increase coverage by 0.25%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #230      +/-   ##
==========================================
+ Coverage   91.60%   91.86%   +0.25%     
==========================================
  Files          11       11              
  Lines        1513     1598      +85     
==========================================
+ Hits         1386     1468      +82     
- Misses        127      130       +3     
Impacted Files Coverage Δ
src/kernelfactors.jl 91.71% <100.00%> (+0.74%) :arrow_up:
src/border.jl 92.93% <0.00%> (-0.17%) :arrow_down:
src/extrema.jl 100.00% <0.00%> (ø)
src/kernel.jl 99.23% <0.00%> (+0.02%) :arrow_up:
src/utils.jl 88.05% <0.00%> (+0.18%) :arrow_up:
src/imfilter.jl 92.03% <0.00%> (+0.25%) :arrow_up:
src/mapwindow.jl 86.90% <0.00%> (+0.46%) :arrow_up:
src/borderarray.jl 93.33% <0.00%> (+0.74%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6b51789...22f8aa0. Read the comment docs.