Skip to content

Commit a80ae3c

Browse files
authored
Tuples in _vcat (#255)
* Tuples in _vcat * version bump to v0.7.31
1 parent 533556f commit a80ae3c

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFunBase"
22
uuid = "fbd15aa5-315a-5a7d-a8a4-24992e37be05"
3-
version = "0.7.30"
3+
version = "0.7.31"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/Operators/general/InterlaceOperator.jl

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -451,15 +451,12 @@ operators(A::Operator) = [A]
451451

452452
Base.vcat(A::MatrixInterlaceOperator...) =
453453
InterlaceOperator(vcat(map(operators,A)...))
454+
455+
__vcat(a::VectorInterlaceOperator, b::OperatorTypes...) = (a.ops..., __vcat(b...)...)
456+
__vcat(a::OperatorTypes, b::OperatorTypes...) = (a, __vcat(b...)...)
457+
__vcat() = ()
454458
function _vcat(A::OperatorTypes...)
455-
Av = Vector{Operator{mapreduce(eltype,promote_type,A)}}()
456-
for a in A
457-
if a isa VectorInterlaceOperator
458-
append!(Av,a.ops)
459-
else
460-
push!(Av,a)
461-
end
462-
end
459+
Av = __vcat(A...)
463460
InterlaceOperator(vnocat(Av...))
464461
end
465462

0 commit comments

Comments
 (0)