def transform(self, X):
        """
        Parameters
        ----------
        X : array-like, shape [n x m]
            The mask in form of n x m array.
        """

        if self.binary_:
            return (X & self.definition_ > 0).astype(int)
        return (X == self.definition_).astype(int)
def transform ( self , X ) : if self . binary_ : return ( X & self . definition_ > 0 ) . astype ( int ) return ( X == self . definition_ ) . astype ( int )
Parameters
        ----------
        X : array-like, shape [n x m]
            The mask in form of n x m array.