(self, data)
return [self.fit_cols, self.fit_rows][self.axis](attributes, x, n_vals)
Prepare the data on attributes, call `fit_cols` or `fit_rows` and
        return the resulting model.
Prepare the data on attributes, call `fit_cols` or `fit_rows` and
        return the resulting model.
Prepare the data on attributes call fit_cols or fit_rows and return the resulting model .
def fit(self, data):
        """
        Prepare the data on attributes, call `fit_cols` or `fit_rows` and
        return the resulting model.
        """
        x = _orange_to_numpy(data)
        if hasattr(data, "domain"):
            attributes = data.domain.attributes
            n_vals = np.fromiter(
                (len(attr.values) if attr.is_discrete else 0
                 for attr in attributes),
                dtype=np.int32, count=len(attributes))
        else:
            assert isinstance(x, np.ndarray)
            attributes = None
            n_vals = np.zeros(x.shape[1], dtype=np.int32)
        return [self.fit_cols, self.fit_rows][self.axis](attributes, x, n_vals)
def fit ( self , data ) : x = _orange_to_numpy ( data ) if hasattr ( data , "domain" ) : attributes = data . domain . attributes n_vals = np . fromiter ( ( len ( attr . values ) if attr . is_discrete else 0 for attr in attributes ) , dtype = np . int32 , count = len ( attributes ) ) else : assert isinstance ( x , np . ndarray ) attributes = None n_vals = np . zeros ( x . shape [ 1 ] , dtype = np . int32 ) return [ self . fit_cols , self . fit_rows ] [ self . axis ] ( attributes , x , n_vals )