I am really new to Julia, and so I am going to ask a very very elementary question. I understand the logic of the dot (.) to make element-wise operation however, I am perplexed by this very simple piece of code
array_try_op = [1, 2, 3, 4]
array_sum2 = array_try_op .+ 2
array_sum2_wrong = array_try_op + 2
array_prod2 = array_try_op .* 2
array_prod2_wrong = array_try_op * 2
Indeed, when I try to perform array_sum2_wrong = array_try_op + 2 I correctly get an error message, but on the contrary array_prod2_wrong = array_try_op * 2 does not return any error message, and actually returns the same result of array_prod2 = array_try_op .* 2
Why this is the case?