Get access to 7×0 view

Hi,

could anyone show me how to get the values of this 7x0 view, please:

debug> x
7×0 view(::Matrix{Float32}, :, 1:0) with eltype Float32

I have already tried

debug> x[:]
Float32[]

debug> x[:,:]
7×0 Matrix{Float32}

debug> x[:,:,1]
7×0 Matrix{Float32}

debug> x[:,1:0]
7×0 Matrix{Float32}

What result are you expecting? Notice that a 7×0 matrix contains a total of 7*0 elements, i.e. it’s empty.

3 Likes