Apologies in advance if this is something that has been discussed at length 
already, I wasn't able to find it.

In Julia 0.5, if A is a 5x5 matrix, the behavior of A[1,:] will be changed 
to return a 5-element array instead of a 1x5 array.  However, at least in 
the current build, sum(A,1) still gives a 1x5 array as it does in earlier 
versions, and similarly for other array reductions like mean, maximum, 
etc.  

I understand that these functions and slicing are fundamentally different 
things, but I find this a little counter intuitive (at the very least 
different from numpy's behavior).  I often find myself interested in 
quantities such as A[1,:] ./ mean(A,1) (the first row of a matrix 
normalized by the average of each column's entries).  In 0.5, this gives 
something quite different from what I'm expecting (in fact it gives a 5x5 
matrix).

So my questions are: Is there a discussion of the rationale behind doing 
things this way?  Is this something that may be changed in the future?  If 
not, is there an alternative to the standard sum, mean, etc. functions that 
is recommended for this?  Just a liberal use of squeeze()?

Reply via email to