(self, data: Union[Table, DistMatrix, None])
Set the input dataset or distance matrix.
Set the input dataset or distance matrix.
Set the input dataset or distance matrix .
def set_data(self, data: Union[Table, DistMatrix, None]):
        """
        Set the input dataset or distance matrix.
        """
        self.closeContext()
        self.clear()
        try:
            if isinstance(data, Orange.misc.DistMatrix):
                self._set_distances(data)
            elif isinstance(data, Orange.data.Table):
                self._set_table(data)
            else:
                self.distances = None
                self.data = None
        except InputValidationError as err:
            self.Error.input_validation_error(err.message)
            self.distances = None
            self.data = None
def set_data ( self , data : Union [ Table , DistMatrix , None ] ) : self . closeContext ( ) self . clear ( ) try : if isinstance ( data , Orange . misc . DistMatrix ) : self . _set_distances ( data ) elif isinstance ( data , Orange . data . Table ) : self . _set_table ( data ) else : self . distances = None self . data = None except InputValidationError as err : self . Error . input_validation_error ( err . message ) self . distances = None self . data = None