Skip to content

Commit fe41c3c

Browse files
committed
Fix
1 parent 6fdcbb2 commit fe41c3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/named_array_partition.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ end
2626
# fields except through `getfield` and accessor functions.
2727
ArrayPartition(x::NamedArrayPartition) = getfield(x, :array_partition)
2828

29-
function Base.similar(A::NamedArrayPartition{T, S}) where {T, S}
30-
NamedArrayPartition(ArrayPartition{T, S}(similar.(getfield(A, :array_partition))),
31-
getfield(A, :names_to_indices))
29+
function Base.similar(A::NamedArrayPartition)
30+
NamedArrayPartition(
31+
similar(getfield(A, :array_partition)), getfield(A, :names_to_indices))
3232
end
3333

3434
# return ArrayPartition when possible, otherwise next best thing of the correct size

0 commit comments

Comments
 (0)