check shape of sliced array