I suspect the following will be more efficient for larger arrays:
not_in(inds::AbstractVector{Int}, n::Int)::Vector{Int} = setdiff(1:n, IntSet(inds))
A = randn(5, 5)
R = [2, 3]
C = [4, 5]
A[not_in(R, size(A,1)), not_in(C, size(A,2))]
I suspect the following will be more efficient for larger arrays:
not_in(inds::AbstractVector{Int}, n::Int)::Vector{Int} = setdiff(1:n, IntSet(inds))
A = randn(5, 5)
R = [2, 3]
C = [4, 5]
A[not_in(R, size(A,1)), not_in(C, size(A,2))]