Delete the nth frontal of a 3th-order tensor(array)

I think you can and it’s still faster:

n = 4
@btime @view($A[:, :, [1:($n-1);($n+1):end]]);
2 Likes