Skip to content

Commit ced6634

Browse files
author
Michael Abbott
committed
rstack kw fix
1 parent 23839d1 commit ced6634

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/LazyStack.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ function rewrap_names(A, a::NamedDimsArray{L}) where {L}
453453
B = rewrap_names(A, parent(a))
454454
ensure_named(B, (L..., ntuple(_ -> :_, ndims(A) - ndims(a))...))
455455
end
456-
function rstack(s::Symbol, args...)
457-
data = rstack(args...)
456+
function rstack(s::Symbol, args...; kw...)
457+
data = rstack(args...; kw...)
458458
name_last = ntuple(d -> d==ndims(data) ? s : :_, ndims(data))
459459
ensure_named(data, name_last)
460460
end

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ end
214214
@test rstack(1:2, OffsetArray([2,3], +1)) == [1 0; 2 2; 0 3]
215215
@test rstack(1:2, OffsetArray([0.1,1], -1)) == OffsetArray([0 0.1; 1 1.0; 2 0],-1,0)
216216

217+
@test dimnames(rstack(:b, 1:2, [3,4,5], fill=NaN)) == (:_, :b)
217218
@test dimnames(rstack(:b, NamedDimsArray(1:2, :a), OffsetArray([2,3], +1))) == (:a, :b)
218219

219220
end

0 commit comments

Comments
 (0)