4 ms·
One thing I always dislike about julia is the .+ .* .< ... all those dots for element-wise operations. It is inherited from Matlab, but is a bad design because
by abakus 8y ago
One thing I always dislike about julia is the .+ .* .< ... all those dots for element-wise operations. It is inherited from Matlab, but is a bad design because more common usage should have shorter operators.
- eigenspace 8y agoTheres an @. macro that will broadcast all the following operations. ie. exp.(v.^2) .+ (10 .* u) can be written as @. exp(v^2) + (10 * u) with no added runtime cost.
- ssfrr 8y agoWhether elementwise or linear algebra operations are more common depends on your use case. I’m personally super happy not to need to write np.dot(A, b) when I could just write A*b, or a’b for an inner product, which matches the math and will do the right thing with complex numbers.