[julia-users] Re: Correct way to use squeeze function

2016-08-24 Thread Sigurd Stoll
That clears things up, thank you very much. On Tuesday, August 23, 2016 at 9:12:20 PM UTC+2, jonatha...@alumni.epfl.ch wrote: > > Squeeze will remove s dimension of size one, so you can transform an array > of size 5x1x4 into 5x4 by squeezing the dimension 2. > > In 0.4 the last dimension is

[julia-users] Correct way to use squeeze function

2016-08-23 Thread Sigurd Stoll
Hello everyone, I'm having some difficulties understanding the squeeze function, let's say I have a 3 dimensional array A of size 5x4x3, and I want to extract the elements corresponding to A[:,:,1]. I suppose I could do B = A[:,:,1], but what's the point of squeeze then? The Julia