From 94fd8f0bf94cb157935aa97d53109720118e433c Mon Sep 17 00:00:00 2001 From: kalmar Date: Thu, 6 Jul 2017 09:03:05 +0200 Subject: [PATCH] fix: can not assign in short-circut eval --- src/Orbit-wise.jl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Orbit-wise.jl b/src/Orbit-wise.jl index 3d9879e..9a16741 100644 --- a/src/Orbit-wise.jl +++ b/src/Orbit-wise.jl @@ -78,9 +78,11 @@ function init_orbit_data(logger, sett::Settings; radius=2) end function transform(U::AbstractArray, V::AbstractArray; sparse=false) - w = U'*V*U - sparse && w = sparsify(w) - return w + w = U'*V*U + if sparse + w = sparsify(w) + end + return w end A(data::OrbitData, π, t) = data.dims[π]*transform(data.Us[π], data.cnstr[t], sparse=true)