diff --git a/Project.toml b/Project.toml index 091cf69..1cba112 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "NonconvexCore" uuid = "035190e5-69f1-488f-aaab-becca2889735" authors = ["Mohamed Tarek and contributors"] -version = "1.4.1" +version = "1.4.2" [deps] ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" diff --git a/src/functions/functions.jl b/src/functions/functions.jl index fdd5198..0698683 100755 --- a/src/functions/functions.jl +++ b/src/functions/functions.jl @@ -101,9 +101,9 @@ end Calls the wrapped functions in `f` with arguments `args` and keyword arguments `kwargs` and returns the concatenated output. """ function (f::VectorOfFunctions)(args...; kwargs...) + length(f.fs) == 0 && return Union{}[] ys = map(f.fs) do f - out = f(args...; kwargs...) - length(out) == 0 ? Union{}[] : out + return f(args...; kwargs...) end return vcat(ys...) end @@ -282,7 +282,6 @@ Returns the function wrapped in `f`. """ getfunction(f::EqConstraint) = f.f - """ Used in semidefinite programming @@ -294,8 +293,6 @@ end function (c::SDConstraint)(args...; kwargs...) out = c.f(args...; kwargs...) - # println(length(out)) - # println(getdim(c)) @assert length(out) == getdim(c)^2 return out end