original_docstring: Fit a linear model with integer coefficient and L1 regularization
          
          Params
          ------
          _sample_weight: np.ndarray (n,)
              weight for each individual sample
          
docstring: Fit a linear model with integer coefficient and L1 regularization
  Params
  
  np.ndarray (n,)
  weight for each individual sample
docstring_tokens: Fit a linear model with integer coefficient and L1 regularization Params np . ndarray ( n ) weight for each individual sample
code: def fit(self, X, y, lambda_reg=0.1, sample_weight=None):
          '''Fit a linear model with integer coefficient and L1 regularization
          
          Params
          ------
          _sample_weight: np.ndarray (n,)
              weight for each individual sample
          '''
  
          if 'pandas' in str(type(X)):
              X = X.values
          if 'pandas' in str(type(y)):
              y = y.values
          assert type(X) == np.ndarray, 'inputs should be ndarrays'
          assert type(y) == np.ndarray, 'inputs should be ndarrays'
  
          self.model.fit(X, y, keep_record=False)
code_tokens: def fit ( self , X , y , lambda_reg = 0.1 , sample_weight = None ) : if 'pandas' in str ( type ( X ) ) : X = X . values if 'pandas' in str ( type ( y ) ) : y = y . values assert type ( X ) == np . ndarray , 'inputs should be ndarrays' assert type ( y ) == np . ndarray , 'inputs should be ndarrays' self . model . fit ( X , y , keep_record = False )
short_docstring: Fit a linear model with integer coefficient and L1 regularization
  Params
short_docstring_tokens: Fit a linear model with integer coefficient and L1 regularization Params
comment: '''Fit a linear model with integer coefficient and L1 regularization
          
          Params
          ------
          _sample_weight: np.ndarray (n,)
              weight for each individual sample
          '''