size(m, 1) — counts _over_ rows sum(m, 1) — sums _over_ rows
So no mixup, just a different perspective than you’re taking right now. My best advice: discard everything you know about R while using Julia. If you’ve used Matlab, that will be much more useful as an analogy for how Julia works. — John On Oct 26, 2014, at 4:59 AM, Justas _ <[email protected]> wrote: > I am a bit confused. Take a look: > > size(m, 1) # returns size of rows > size(m, 2) # returns size of columns > > sum(m, 1) # sums columns > sum(m, 2) # sums rows > > Also, I have R background, and there 1 is used for rows, 2 - for columns. > > Why Julia mixes this up?
