Skip to content

Commit a70c164

Browse files
fix multi array partition
1 parent c7ee8d3 commit a70c164

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/array_partition.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Base.similar(A::ArrayPartition, ::Type{T}, dims::NTuple{N,Int}) where {T,N} = si
4040
N != length(R) + 2 &&
4141
throw(DimensionMismatch("number of types must be equal to number of partitions"))
4242

43-
types = (T, S, parameter.(R)) # new types
43+
types = (T, S, parameter.(R)...) # new types
4444
expr = :(similar(A.x[i], ($types)[i]))
4545

4646
build_arraypartition(N, expr)
@@ -292,3 +292,4 @@ common_number(a, b) =
292292
Return type `T` of singleton.
293293
"""
294294
parameter(::Type{T}) where {T} = T
295+
parameter(::Type{Type{T}}) where {T} = T

0 commit comments

Comments
 (0)