Re: [julia-users] Re: Why was a fundamental indexing inconsistency introduced in 0.5?

2016-09-26 Thread Tim Holy
Try explaining both indexing behaviors to a newcomer and you'll see the difference. Old behavior: `3:3` causes the dimension to be retained; `3` causes the dimension to be dropped if it's a 'trailing dimension' (all the later indices are also scalars) but retained if it's a 'leading dimension'

[julia-users] Re: Why was a fundamental indexing inconsistency introduced in 0.5?

2016-09-26 Thread Christoph Ortner
I am largely a fan of Matlab-idioms, but repmat is an exception, it leads to code that only the person who wrote it will understand (at least for a few days after they wrote it)

[julia-users] Re: Why was a fundamental indexing inconsistency introduced in 0.5?

2016-09-25 Thread Randy Zwitch
As someone who has never used repmat, I can't comment on that, but the "automatic squashing" makes perfect sense to me. The first syntax simplifies the structure down to a 1-D instead of a 2-D array with only one row (repmat aside, why would I want to keep the extra dimension if it doesn't