I can’t see why these three statements do different things:
data = [4;3;2;1;5]
x = data .- findmin(data) # Subtract the min from each value. Does what I want.
x = @. data - findmin(data) # Error, can't broadcast because it "sees" an array of length 2???
x = @. data - getindex(findmin(data),1). # Works but doesn't produce the desired result.
I feel like all three lines should do the same thing: subtract the minimum value from each number in the array?
Related, when using @., is there a way to opt out of the dotting within parentheses?
For example, for scalars α, β, and a vector x, I would like to perform (α * β) .* x. using @. I thought I would prevent the penetration of the dot into the parenthesized expression by @. $(α * β) * x, but it seems that both @. (α * β) * x and @. $(α * β) * x generate the same native code according to @code_native, so I’m confused.