From 8e9b1c9fdb79a7cf28e8b47f32a44195adbf1e67 Mon Sep 17 00:00:00 2001 From: Jishnu Bhattacharya Date: Sat, 7 Dec 2024 16:29:45 +0530 Subject: [PATCH] `map` instead of broadcast in `size` for `Zeros`/`Ones` --- src/FillArrays.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FillArrays.jl b/src/FillArrays.jl index 66dad480..ca53f4f5 100644 --- a/src/FillArrays.jl +++ b/src/FillArrays.jl @@ -329,7 +329,7 @@ for (AbsTyp, Typ, funcs, func) in ((:AbstractZeros, :Zeros, :zeros, :zero), (:Ab @inline $Typ(::Type{T}, m...) where T = $Typ{T}(m...) @inline axes(Z::$Typ) = Z.axes - @inline size(Z::$AbsTyp) = length.(axes(Z)) + @inline size(Z::$AbsTyp) = map(length, axes(Z)) @inline getindex_value(Z::$AbsTyp{T}) where T = $func(T) AbstractArray{T}(F::$AbsTyp) where T = $Typ{T}(axes(F))