sum(p, 1:2) should be the same as sum(sum(p, [1]), [2]), right? On Fri, May 27, 2016 at 11:54 AM, a. kramer <[email protected]> wrote:
> If you are proposing that sum(p,1) should drop dimensions but sum(p,[1]) > should not, I don't think there is an easy solution like that. What should > sum(p,1:2) do? > > > On Friday, May 27, 2016 at 6:52:58 AM UTC-4, Christoph Ortner wrote: >> >> >> >> On Thursday, 26 May 2016 03:03:03 UTC+1, Tim Holy wrote: >>> >>> Since you asked...from my perspective, the easiest argument against it >>> is >>> >>> pnormalized = p ./ sum(p, 1) >>> >>> If you drop the summed dimension, that won't work anymore. One can write >>> >>> pnormalized = p ./ reshape(sum(p, 1), 1, size(p, 2)) >>> >> >> Would the point of the new notation be to write >> >> pnormalized = p ./ sum(p, [1]) >> >> >
