class_docstr: A class for representing a scalar-value penalty.
  
  Parameters
  ----------
  weights : array_like
      A vector of weights that determines the weight of the penalty
      for each parameter.
  
  Notes
  -----
  The class has a member called `alpha` that scales the weights.
class_docstr_tok: ["A","class","for","representing","a","scalar-value","penalty",".","Parameters","--","--","--","--","--","weights",":","array_like","A","vector","of","weights","that","determines","the","weight","of","the","penalty","for","each","parameter",".","Notes","--","--","-","The","class","has","a","member","called","`","alpha","`","that","scales","the","weights","."]
docstr: work around for Null model
  
  This will not be needed anymore when we can use `self._null_drop_keys`
  as in DiscreteModels.
  TODO: check other models
docstr_tok: ["work","around","for","Null","model","This","will","not","be","needed","anymore","when","we","can","use","`","self._null_drop_keys","`","as","in","DiscreteModels",".","TODO",":","check","other","models"]
code: def _null_weights(self, params):
      """work around for Null model
  
      This will not be needed anymore when we can use `self._null_drop_keys`
      as in DiscreteModels.
      TODO: check other models
      """
      if np.size(self.weights) > 1:
          if len(params) == 1:
              raise  # raise to identify models where this would be needed
              return 0.0
  
      return self.weights
  
imports: import numpy
label_desc: Use image node_id 4 for calling the Penalty obj's underlying member method code with example usage: obj._null_weights(params) and returns: self, int