use logical AND

This commit is contained in:
Liwei Song 2020-10-23 08:58:49 -04:00
parent 0fa87d200c
commit 893b615d72

View file

@ -119,7 +119,7 @@ class AttackType(enum.Enum):
@property
def is_trained_attack(self):
"""Returns whether this type of attack requires training a model."""
return (self != AttackType.THRESHOLD_ATTACK) & (self != AttackType.THRESHOLD_ENTROPY_ATTACK)
return (self != AttackType.THRESHOLD_ATTACK) and (self != AttackType.THRESHOLD_ENTROPY_ATTACK)
def __str__(self):
"""Returns LOGISTIC_REGRESSION instead of AttackType.LOGISTIC_REGRESSION."""