PaddedViews.jl icon indicating copy to clipboard operation
PaddedViews.jl copied to clipboard

Different output in runtests.jl versus in REPL when prepending padding

Open kpa28-git opened this issue 2 years ago • 0 comments

Running PaddedView(missing, 1:7, (-2:7,)) in the REPL outputs this:

10-element PaddedView(missing, ::UnitRange{Int64}, (-2:7,)) with eltype Union{Missing, Int64} with indices -2:7:
  missing
  missing
  missing
 1
 2
 3
 4
 5
 6
 7

This line @show PaddedView(missing, 1:7, (-2:7,)) in a runtests.jl for a package ExamplePackage (where Pkg>test ExamplePackage was used to run tests) shows this (using the latest release of PaddedViews):

PaddedView(missing, 1:7, (-2:7,)) = Union{Missing, Int64}[1, 2, 3, 4, 5, 6, 7, #undef, #undef,
#undef]

This behavior only happens with prepended padding, appended padding outputs the same result in both REPL and runtests.jl:

PaddedView(missing, 1:7, (1:10,)) = Union{Missing, Int64}[1, 2, 3, 4, 5, 6, 7, missing, missing, missing]

kpa28-git avatar Feb 14 '23 05:02 kpa28-git