seagull/lifeforms/custom.py
def validate_input_values(self, X: np.ndarray):
        """Check if all elements are binary"""
        if not ((X == 0) | (X == 1) | (X is True) | (X is False)).all():
            msg = "Input array should only contain {0,1} or {True,False}"
            logger.error(msg)
            raise ValueError(msg)
Check if all elements are binary
Check if all elements are binary
Check if all elements are binary
def validate_input_values(self, X: np.ndarray):
        if not ((X == 0) | (X == 1) | (X is True) | (X is False)).all():
            msg = "Input array should only contain {0,1} or {True,False}"
            logger.error(msg)
            raise ValueError(msg)
def validate_input_values ( self , X : np . ndarray ) : if not ( ( X == 0 ) | ( X == 1 ) | ( X is True ) | ( X is False ) ) . all ( ) : msg = "Input array should only contain {0,1} or {True,False}" logger . error ( msg ) raise ValueError ( msg )
Check if all elements are binary
Check if all elements are binary
"""Check if all elements are binary"""
self
X
np.ndarray