Add VERSION check around broadcast piracy
This commit is contained in:
parent
44ccdb7ca9
commit
baf868e851
@ -434,7 +434,8 @@ end
|
|||||||
using Requires
|
using Requires
|
||||||
|
|
||||||
# https://github.com/FluxML/Flux.jl/issues/353
|
# https://github.com/FluxML/Flux.jl/issues/353
|
||||||
@init Requires.isprecompiling() || @eval Base.Broadcast begin
|
if VERSION < v"1.1.0-DEV.548"
|
||||||
|
@init Requires.isprecompiling() || @eval Base.Broadcast begin
|
||||||
function flatten(bc::Broadcasted{Style}) where {Style}
|
function flatten(bc::Broadcasted{Style}) where {Style}
|
||||||
isflat(bc) && return bc
|
isflat(bc) && return bc
|
||||||
args = cat_nested(bc)
|
args = cat_nested(bc)
|
||||||
@ -458,4 +459,5 @@ using Requires
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user