(self)
Output the transformed data.
Output the transformed data.
Output the transformed data .
def apply(self):
        """Output the transformed data."""
        self.Error.clear()
        self.class_name = self.class_name.strip()
        if not self.attribute:
            self.Outputs.data.send(None)
            return
        domain = self.data.domain
        if not self.class_name:
            self.Error.class_name_empty()
        if self.class_name in domain:
            self.Error.class_name_duplicated()
        if not self.class_name or self.class_name in domain:
            self.Outputs.data.send(None)
            return
        new_class = self._create_variable()
        new_domain = Domain(
            domain.attributes, new_class, domain.metas + domain.class_vars)
        new_data = self.data.transform(new_domain)
        self.Outputs.data.send(new_data)
def apply ( self ) : self . Error . clear ( ) self . class_name = self . class_name . strip ( ) if not self . attribute : self . Outputs . data . send ( None ) return domain = self . data . domain if not self . class_name : self . Error . class_name_empty ( ) if self . class_name in domain : self . Error . class_name_duplicated ( ) if not self . class_name or self . class_name in domain : self . Outputs . data . send ( None ) return new_class = self . _create_variable ( ) new_domain = Domain ( domain . attributes , new_class , domain . metas + domain . class_vars ) new_data = self . data . transform ( new_domain ) self . Outputs . data . send ( new_data )