How to create a (n-1) dimensional view of a n dimensional array in a general way?

using Base.Iterators
A[repeated(:,ndims(A)-1)..., 1]

or with EllipsisNotation.jl:

A[.., 1]
1 Like