Hi ,
I am trying to understand the way how squeeze function works,
when I tried to do the following it gives me the error " squeezed dims must all be size 1"

P = 0.1*ones(Float64, 4, 9)
for i=2:4
squeeze(P[i,:],1)
end

squeeze(A, dims)
Remove the dimensions specified by dims from array A. Elements of dims must
be unique and within the range 1:ndims(A). size(A,i) must equal 1 for all i
in dims.
Example
≡≡≡≡≡≡≡≡≡
julia> a = reshape(collect(1:4),(2,2,1,1))
2×2×1×1 Array{Int64,4}:
[:, :, 1, 1] =
1 3
2 4
julia> squeeze(a,3)
2×2×1 Array{Int64,3}:
[:, :, 1] =
1 3
2 4

In your case P[i,:] already returns a Vector what do you want to squeeze there?