drops = (N == np.diag(N)).sum(axis=0) > 1
return A[:, (~drops)], drops

def drop_strict(A):
    A1, d1 = drop_duplicates(A)
A2, d2 = drop_subsets(A1)
d1[~d1] = d2
return A2, d1
A = np.array([[1, 0, 0, 0, 0, 1], [0, 1, 1, 1, 1, 0], [1, 0, 1, 0, 1, 1], [
    1, 1, 0, 1, 0, 1], [1, 1, 0, 1, 0, 0], [1, 0, 0, 0, 0, 0], [0, 0, 1, 1,
    1, 0], [0, 0, 1, 0, 1, 0]])
B, drops = drop_strict(A)
2-D Matrix: Finding and deleting columns that are subsets of other columns