Closed johnnychen94 closed 5 years ago
Merging #104 into master will increase coverage by
0.01%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #104 +/- ##
==========================================
+ Coverage 81.58% 81.59% +0.01%
==========================================
Files 9 9
Lines 1200 1201 +1
==========================================
+ Hits 979 980 +1
Misses 221 221
Impacted Files | Coverage Δ | |
---|---|---|
src/utils.jl | 73.68% <100%> (+0.46%) |
: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 0ae7df1...4d37ff8. Read the comment docs.
Merging #104 into master will increase coverage by
0.86%
. The diff coverage is100%
.
@@ Coverage Diff @@
## master #104 +/- ##
==========================================
+ Coverage 81.58% 82.44% +0.86%
==========================================
Files 9 9
Lines 1200 1202 +2
==========================================
+ Hits 979 991 +12
+ Misses 221 211 -10
Impacted Files | Coverage Δ | |
---|---|---|
src/utils.jl | 74.13% <100%> (+0.92%) |
:arrow_up: |
src/kernelfactors.jl | 80.15% <0%> (+7.93%) |
: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 0ae7df1...5c0cab3. Read the comment docs.
In summary, this pull-request ensures that if you call centered
on an OffsetArray
it will adjust the axes of the original data array that was being wrapped.
For example,
axes(centered(collect(1:5))) # (Base.IdentityUnitRange(-2:2),)
axes(OffsetArray(collect(1:5),-1)) # (Base.IdentityUnitRange(0:4),)
axes(centered(OffsetArray(collect(1:5),-1))) # (Base.IdentityUnitRange(-3:1),) (Without this pull-request)
axes(centered(OffsetArray(collect(1:5),-1))) # (Base.IdentityUnitRange(-2:2),) (Thanks to this pull-request)
@timholy Are you OK with this new behaviour?
Thanks for doing this!
This patch generalizes
centered(A::AbstractArray)
by not assuming indexes of A starting at 1.A side effect of this patch is to corrects the behavior of
imfilter
with accident usage ofcentered(::OffsetArray)
Before:
After: