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 documentation Release 0.4.7-pre has this to say about squeeze: 
"Remove the dimensions specified by dims from array A. Elements of dims 
must be unique and within the range 1:ndims(A)." From this it seems like B 
= squeeze(A,3) should do the trick, i.e. extract the elements A[:,:,1] from 
A, and form a new array B of size 5x4. This however produces an error 
stating that squeezed dims must all be size 1". I'm clearly missing 
something here. Does anyone have some advice?

Reply via email to