I hope the goal is for slicing to work like numpy. Stefan Karpinski wrote:
> No, this is a pretty contentious issue. A lot of the relevant discussion is > in #4774 <https://github.com/JuliaLang/julia/issues/4774>. The one thing > everyone agrees on which is going to happen in 0.4 for sure is that slicing > will generally create views into the original array rather than copying the > data. > > > On Tue, Sep 2, 2014 at 2:24 PM, Christoph Ortner > <christophortn...@gmail.com >> wrote: > >> >> >> On Tuesday, 2 September 2014 19:12:01 UTC+1, Stefan Karpinski wrote: >>> >>> Are slices in Julia any worse than in Matlab? If so, what does Matlab do >>> that's better? I agree that our current slicing needs improvements (they >>> are planned), but it is largely due to its Matlab heritage. >>> >> >> I did not mean to apply that Julia is worse in this respect. Off the cuff, >> I would say slicing is no better or worse than in matlab. And, for the >> record, slicing multi-dimensional arrays in Matlab has been driving me mad >> for some quite some time. >> >> I've skimmed the discussions in the "issues" lists on github, and I very >> much liked the idea of distinguishing >> a[i:i, :, :] >> from >> a[i, :, :] >> until I remembered that I want >> a[i,:] >> to be a row-vector. But I can't have the cake and eat it too. >> >> Is there a consensus yet what the final slicing behaviour will be? >> >> --Christoph >> >> -- -- Those who don't understand recursion are doomed to repeat it