-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Your test code uses x .*= y, so you should know that in Julia 0.5 this has changed meaning to be equivalent to broadcast!(identity, x, x .* y), so that it mutates the x array (see JuliaLang/julia#17510 … in Julia 0.6 the whole operation will occur in-place without temporaries). So .* should only be used if the left-hand side is a mutable array, and you don't mind mutating it.
At first glance, this looks like it is okay for you, because you use it in psi.data[i] .*=, where psi.data seems like an array that intend to mutate. But if it were a problem you could always change it to *=. For a scalar multiplication like this, in any case, *= is probably more efficient.
Note, however, that there is currently a bug in Julia 0.5, and psi.data[i] .*= won't work correctly until JuliaLang/julia#17546 is merged.