I don't understand this bit: "Numpy's notation has the advantage to make 
the most expensive operations harder to write, it also easily reminds us 
that arrays in numpy are row-major." How does this make the more expensive 
operation harder to write?

Just by writing this (for a a 2D array):
for i in a.T:
   do_something(i)
or even worse that:
for i in range(a.shape[1]):
   do_something(a[:,i])
I already know that I'm doing something slower than:
for i in a:







To me (but I didn't design Julia so what do I know) have a[i] refer to a 
> specific element makes sense because it makes it easy to write a loop that 
> does something to each element without having to worry about the dimensions 
> of the array. 
>
To me all dotted operators and all the basic functions already does that. 
If you want to perform operations inplace, inplace operators can also be 
dotted which makes the write of explicite loops over all the elements of a 
multidimensional array a pretty rare custom.

Reply via email to