You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your 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.
It wasn't completely clear to me if your code is okay, because I couldn't tell at first glance whether r[i] is a mutable array (ok) or a number (not ok) in r[i] ./= a. But if it is a problem you could always change it to r[i] = r[i] ./ a.
The text was updated successfully, but these errors were encountered:
Your code uses
x ./= y
, so you should know that in Julia 0.5 this has changed meaning to be equivalent tobroadcast!(identity, x, x ./ y)
, so that it mutates thex
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.It wasn't completely clear to me if your code is okay, because I couldn't tell at first glance whether
r[i]
is a mutable array (ok) or a number (not ok) inr[i] ./= a
. But if it is a problem you could always change it tor[i] = r[i] ./ a
.The text was updated successfully, but these errors were encountered: