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.
At first glance, this seems like a problem for you, because you use y .+= μ / (1 - ρ) where y is a LinSpace object, which is immutable. You can change it to += to avoid trying to mutate y. (However, the code is type-unstable in any case because y changes types, so you might want to use a new variable.)
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.At first glance, this seems like a problem for you, because you use
y .+= μ / (1 - ρ)
wherey
is aLinSpace
object, which is immutable. You can change it to+=
to avoid trying to mutatey
. (However, the code is type-unstable in any case becausey
changes types, so you might want to use a new variable.)The text was updated successfully, but these errors were encountered: