Inputing 1:3 .== 1:3 will return a BitVector of the form 1 1 1 as a column vector

If we set A = 1:3 .== 1:3 and take transpose(A) we get the typical transpose i.e. given as a row vector.

However, if we input 1:3 .== 1:3 |> transpose we receive a 3x3 matrix with ones along the diagonal. I understand why there is 1’s along the diagonal and 0’s elsewhere, but I’m curious why the difference in return evaluation.

I am curious as to why this is if someone could explain?

I’m not at a computer so I can’t check, but I suspect this is due to |> having higher precedence than ==. The broadcast then expands the singleton dimensions, resulting in a matrix.

You can check with Meta.@parse what ends up plugged into where.