I wanted to remove column and row from an array, but couldn’t find any function to do that. For example, if I want to remove the second row and second column from the following array, how can I do that?
a = [10i+j for i in 1:4, j in 0:4]
rmr, rmc = [2, 3], [1, 4] # rows and cols to remove
n, m = size(a)
ir, ic = BitArray(ones(n)), BitArray(ones(m))
ir[rmr] .= 0; ic[rmc] .= 0
a[ir,ic]