From 606fe5885489a5c93fb17ac2a3e8f93f9c71b871 Mon Sep 17 00:00:00 2001 From: Filippo Vicentini Date: Sun, 29 Sep 2019 12:33:02 +0200 Subject: [PATCH] Use <:Number --- src/functor.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/functor.jl b/src/functor.jl index 8fb23089..1d3e1bb2 100644 --- a/src/functor.jl +++ b/src/functor.jl @@ -39,8 +39,7 @@ end trainable(m) = functor(m)[1] -params!(p::Params, x::AbstractArray{<:Real}, seen = IdSet()) = push!(p, x) -params!(p::Params, x::AbstractArray{<:Complex{<:Real}}, seen = IdSet()) = push!(p, x) +params!(p::Params, x::AbstractArray{<:Number}, seen = IdSet()) = push!(p, x) function params!(p::Params, x, seen = IdSet()) x in seen && return