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: The gradient of a penalty function.
  
  Parameters
  ----------
  params : array_like
      A vector of parameters
  
  Returns
  -------
  The gradient of the penalty with respect to each element in
  `params`.
docstr_tok: ["The","gradient","of","a","penalty","function",".","Parameters","--","--","--","--","--","params",":","array_like","A","vector","of","parameters","Returns","--","--","--","-","The","gradient","of","the","penalty","with","respect","to","each","element","in","`","params","`","."]
code: def deriv(self, params):
      """
      The gradient of a penalty function.
  
      Parameters
      ----------
      params : array_like
          A vector of parameters
  
      Returns
      -------
      The gradient of the penalty with respect to each element in
      `params`.
      """
      raise NotImplementedError
  
imports: import numpy
label_desc: Use image node_id 3 for calling the Penalty obj's underlying member method code with example usage: obj.deriv(params) without return types