3 ms·
1. I know and pretty much every line of code I have would need to be preceded with a @. I should also add that julia did not follow the matlab insanity of regar
by cycomanic 5y ago
1. I know and pretty much every line of code I have would need to be preceded with a @. I should also add that julia did not follow the matlab insanity of regarding 1D vectors as arrays, but instead throwing errors helps catch errors before they cause weird issues.
2. I agree that this is one of the nice things about Julia.
- adgjlsfhk1 5y agoIn general, what you want to do instead of having `@.` in front of every line is write scalar functions and `@.` their application. For example, instead of writing ``` function f1(A,B,C) tmp = A.+B return tmp1 .* C end f1(::Vector,::Vector,::Vector) ``` You can write ``` function f2(a,b,c) tmp = a + b return tmp1 *c end f2.(::Vector,::Vector,::Vector) ```