Skip to content

Commit f5bccc9

Browse files
specialize SArray
1 parent 38dfc4a commit f5bccc9

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RecursiveArrayTools"
22
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "2.26.2"
4+
version = "2.26.3"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/utils.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ function recursivefill!(b::AbstractArray{T,N},a::T2) where {T<:StaticArray,T2<:S
4747
end
4848
end
4949

50+
function recursivefill!(b::AbstractArray{T,N},a::T2) where {T<:SArray,T2<:Union{Number,Bool},N}
51+
@inbounds for i in eachindex(b)
52+
b[i] = fill(a, typeof(b[i]))
53+
end
54+
end
55+
5056
function recursivefill!(b::AbstractArray{T,N},a::T2) where {T<:Enum,T2<:Enum,N}
5157
fill!(b,a)
5258
end

0 commit comments

Comments
 (0)