scalala/Scalala — Issue #45: Library.sum for matrices
Author: afwlehmann
Created: 2012-01-10 17:27:54+00:00
State: open

This is really just a repost from the google group but since noone has answered in quite a long time and I feel that this might be an issue, please let me ask the following question:

While I'm probably not seeing the wood for the trees, I'm somehow confused with Library.sum for matrices or, more specifically, its result. For

`val foo = DenseMatrix((1,2,3), (4,5,6))`

I'd expect

`sum(foo, Axis.Horizontal)`

to return the sum *along the horizontal axis*, i.e. some `VectorCol(6, 15)`. The same applies to the vertical sum, only vice versa. However, the horizontal and vertical axes seem to be swapped, hence `sum(foo, Axis.Horizontal)` returns some `VectorRow(5,7,9)`.

So my question is whether this is the desired behaviour as I would have expected the contrary. Maybe this is due to the fact that English is a foreign language for me and I'm mixing up the meaning of summing "along" the horizontal or vertical axis (not mocking here, I really think I might have misunderstood the meaning)?

Regards,
Alexander