File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change 7272 recursivecopy! (a[i],x)
7373 end
7474 else
75- if eltype (x) <: Number && (typeof (x) <: Array || typeof (x) <: Number )
76- # Have to check that it's <: Array or can have problems
77- # with abstract arrays like MultiScaleModels.
78- # Have to check <: Number since it could just be a number...
7975 if perform_copy
80- push! (a,copy (x))
81- else
82- push! (a,x)
83- end
84- else
85- if perform_copy
86- if typeof (x) <: Vector && ! (eltype (x) <: Number )
76+ if typeof (x) <: Array && ! (eltype (x) <: Number )
8777 push! (a,recursivecopy (x))
88- elseif typeof (x) <: ArrayPartition || typeof (x) <: AbstractVectorOfArray
78+ elseif typeof (x) <: Array || typeof (x) <: ArrayPartition ||
79+ typeof (x) <: AbstractVectorOfArray
8980 push! (a,copy (x))
90- elseif typeof (x) <: SArray
81+ elseif typeof (x) <: Union{SVector,SMatrix, SArray,Number} # Only immutable
9182 push! (a,x)
9283 else
9384 push! (a,deepcopy (x))
9485 end
9586 else
9687 push! (a,x)
9788 end
98- end
9989 end
10090 nothing
10191end
You can’t perform that action at this time.
0 commit comments