We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cba251a commit 40ccaf8Copy full SHA for 40ccaf8
src/utils.jl
@@ -86,6 +86,14 @@ function recursivefill!(b::AbstractArray{T, N},
86
end
87
88
89
+function recursivefill!(bs::AbstractVectorOfArray{T, N},
90
+ a::T2) where {T <: StaticArraysCore.StaticArray,
91
+ T2 <: StaticArraysCore.StaticArray, N}
92
+ @inbounds for b in bs, i in eachindex(b)
93
+ b[i] = copy(a)
94
+ end
95
+end
96
+
97
function recursivefill!(b::AbstractArray{T, N},
98
a::T2) where {T <: StaticArraysCore.SArray,
99
T2 <: Union{Number, Bool}, N}
@@ -94,6 +102,14 @@ function recursivefill!(b::AbstractArray{T, N},
102
103
104
105
106
+ a::T2) where {T <: StaticArraysCore.SArray,
107
+ T2 <: Union{Number, Bool}, N}
108
109
+ b[i] = fill(a, typeof(b[i]))
110
111
112
113
function recursivefill!(b::AbstractArray{T, N}, a::T2) where {T <: Enum, T2 <: Enum, N}
114
fill!(b, a)
115
0 commit comments