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 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 the new behavior is okay for you, because it looks like you use ./= to mutate array slices. However, I noticed what looks like a bug: your code has aligned[:,:,1] = aligned[:,:,1] ./= relativescales[1], which has a redundant assignment. I think you meant just aligned[:,:,1] ./= relativescales[1].
Note, however, that there is currently a bug in Julia 0.5, and aligned[:,:,1] ./= .*= ... won't work correctly until JuliaLang/julia#17546 is merged. (Until then, you can use aligned[:,:,1] = aligned[:,:,1] ./ relativescales[1])
The text was updated successfully, but these errors were encountered:
Your test 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 looks like the new behavior is okay for you, because it looks like you use
./=
to mutate array slices. However, I noticed what looks like a bug: your code hasaligned[:,:,1] = aligned[:,:,1] ./= relativescales[1]
, which has a redundant assignment. I think you meant justaligned[:,:,1] ./= relativescales[1]
.Note, however, that there is currently a bug in Julia 0.5, and
aligned[:,:,1] ./= .*= ...
won't work correctly until JuliaLang/julia#17546 is merged. (Until then, you can usealigned[:,:,1] = aligned[:,:,1] ./ relativescales[1]
)The text was updated successfully, but these errors were encountered: