zero the array where product of X and Y is stored

This commit is contained in:
kalmar 2017-07-11 16:00:50 +02:00
parent 8d22162504
commit ed023be1fd
1 changed files with 1 additions and 0 deletions

View File

@ -318,6 +318,7 @@ end
function mul!{T}(result::AbstractVector{T}, X::AbstractVector{T}, Y::AbstractVector{T}, pm::Array{Int,2})
z = zero(T)
result .= z
for (j,y) in enumerate(Y)
if y != z
for (i, index) in enumerate(pm[:,j])