Python Numpy Array Boolean Operations On Sets In Mathematics