Skip to content

Commit 7bc3561

Browse files
committed
Fix tests
1 parent 419105f commit 7bc3561

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/array_interface.jl

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ function Base.cat(inputs::ComponentArray...; dims::Int)
3131
end
3232
end
3333

34+
Base.hcat(inputs::ComponentArray...) = Base.cat(inputs...; dims=2)
35+
Base.vcat(inputs::ComponentArray...) = Base.cat(inputs...; dims=1)
3436
function Base._typed_hcat(::Type{T}, inputs::Base.AbstractVecOrTuple{ComponentArray}) where {T}
3537
return Base.cat(map(i -> T.(i), inputs)...; dims=2)
3638
end

src/axis.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Base.keys(ax::AbstractAxis) = keys(indexmap(ax))
148148
reindex(i, offset) = i .+ offset
149149
reindex(ax::FlatAxis, _) = ax
150150
reindex(ax::Axis, offset) = Axis(map(x->reindex(x, offset), indexmap(ax)))
151-
reindex(ax::ViewAxis, offset) = ViewAxis(viewindex(ax) .+ offset, indexmap(ax))
151+
reindex(ax::ViewAxis{Inds,IdxMap,Ax}, offset) where {Inds, IdxMap, Ax} = ViewAxis(viewindex(ax) .+ offset, Ax())
152152

153153
# Get AbstractAxis index
154154
@inline Base.getindex(::AbstractAxis, idx) = ComponentIndex(idx)

test/runtests.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ end
507507
@test length(vtempca) == length(temp) + length(ca)
508508
@test [ca; ca; ca] isa Vector
509509
@test vcat(ca, 100) isa Vector
510-
@test [ca' ca']' isa Vector
510+
@test [ca' ca']' isa Adjoint{T, Matrix{T}} where T
511511
@test keys(getaxes([ca' temp']')[1]) == (:a, :b, :c, :q, :r)
512512

513513
# Getting serious about axes

0 commit comments

Comments
 (0)