Skip to content

Commit 748a7b9

Browse files
authored
fixes
1 parent 52f7035 commit 748a7b9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/functions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ elseif VERSION >= v"1.1"
114114
end
115115

116116
@static if VERSION > v"1.9-DEV"
117-
# TODO: only supports dims=: for now
117+
# TODO: support dims keyword. At present this will error with dims=1 etc.
118118
function Base.stack(A::KeyedArray; dims::Colon=:)
119119
data = @invoke stack(A::AbstractArray; dims)
120120
if !allequal(named_axiskeys(a) for a in A)

src/stack.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ end
1515

1616
# tuple of arrays
1717
function LazyStack.lazystack(x::Tuple{Vararg{<:KeyedArray}})
18-
KeyedArray(LazyStack.stack(map(parent, x)), stack_keys(x))
18+
KeyedArray(lazystack(map(parent, x)), stack_keys(x))
1919
end
2020

2121
stack_keys(xs::Tuple{Vararg{<:KeyedArray}}) =
2222
(keys_or_axes(first(xs))..., Base.OneTo(length(xs)))
2323

2424
# array of arrays: first strip off outer containers...
2525
function LazyStack.lazystack(xs::KeyedArray{<:AbstractArray})
26-
KeyedArray(LazyStack.stack(parent(xs)), stack_keys(xs))
26+
KeyedArray(lazystack(parent(xs)), stack_keys(xs))
2727
end
2828
function LazyStack.lazystack(xs::KeyedArray{<:AbstractArray,N,<:NamedDimsArray{L}}) where {L,N}
29-
data = LazyStack.stack(parent(parent(xs)))
29+
data = lazystack(parent(parent(xs)))
3030
KeyedArray(LazyStack.ensure_named(data, LazyStack.getnames(xs)), stack_keys(xs))
3131
end
3232
function LazyStack.lazystack(xs::NamedDimsArray{L,<:AbstractArray,N,<:KeyedArray}) where {L,N}
33-
data = LazyStack.stack(parent(parent(xs)))
33+
data = lazystack(parent(parent(xs)))
3434
LazyStack.ensure_named(KeyedArray(data, stack_keys(xs)), LazyStack.getnames(xs))
3535
end
3636

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Test, AxisKeys, NamedDims
2-
using Statistics, OffsetArrays, Tables, UniqueVectors
2+
using Statistics, OffsetArrays, Tables, UniqueVectors, LazyStack
33
using ChainRulesCore: ProjectTo, NoTangent
44
using ChainRulesTestUtils: test_rrule
55
using FiniteDifferences

0 commit comments

Comments
 (0)