parameters: (self, weight)
docstring: Set weight of each instance.
  
          Parameters
          ----------
          weight : list, numpy array or None
              Weight to be set for each data point.
docstring_summary: Set weight of each instance.
docstring_tokens: Set weight of each instance .
function: def set_weight(self, weight):
          """Set weight of each instance.
  
          Parameters
          ----------
          weight : list, numpy array or None
              Weight to be set for each data point.
          """
          if weight is not None and np.all(weight == 1):
              weight = None
          self.weight = weight
          if self.handle is not None and weight is not None:
              weight = list_to_1d_numpy(weight, name='weight')
              self.set_field('weight', weight)
function_tokens: def set_weight ( self , weight ) : if weight is not None and np . all ( weight == 1 ) : weight = None self . weight = weight if self . handle is not None and weight is not None : weight = list_to_1d_numpy ( weight , name = 'weight' ) self . set_field ( 'weight' , weight )