We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1456ac1 commit 9e95692Copy full SHA for 9e95692
1 file changed
ext/ReactantStructArraysExt.jl
@@ -81,6 +81,7 @@ function Base.similar(
81
bc::Broadcasted{StructArrayStyle{S,N}}, ::Type{ElType}
82
) where {S<:AbstractReactantArrayStyle,N,ElType}
83
bc′ = convert(Broadcasted{S}, bc)
84
+ # It is possible that we have multiple broadcasted arguments
85
alloc(::Type{T}) where {T} = (T <: Complex) ? similar(bc′, T) :
86
(StructArrays.isnonemptystructtype(T) ?
87
StructArrays.buildfromschema(alloc, T) :
0 commit comments