parameters: (self, values)
docstring: Gives the (sub/super)gradient of the atom w.r.t. each argument.
  
          Matrix expressions are vectorized, so the gradient is a matrix.
  
          Args:
              values: A list of numeric values for the arguments.
  
          Returns:
              A list of SciPy CSC sparse matrices or None.
docstring_summary: Gives the (sub/super)gradient of the atom w.r.t. each argument.
docstring_tokens: Gives the ( sub / super ) gradient of the atom w . r . t . each argument .
function: def _grad(self, values):
          """Gives the (sub/super)gradient of the atom w.r.t. each argument.
  
          Matrix expressions are vectorized, so the gradient is a matrix.
  
          Args:
              values: A list of numeric values for the arguments.
  
          Returns:
              A list of SciPy CSC sparse matrices or None.
          """
          X = values[0]
          y = values[1]
          if y <= 0:
              return [None, None]
          else:
              # DX = 2X/y, Dy = -||X||^2_2/y^2
              if self.args[0].is_complex():
                  Dy = -(np.square(X.real) + np.square(X.imag)).sum()/np.square(y)
              else:
                  Dy = -np.square(X).sum()/np.square(y)
  
              Dy = sp.csc_matrix(Dy)
              DX = 2.0*X/y
              DX = np.reshape(DX, (self.args[0].size, 1))
              DX = scipy.sparse.csc_matrix(DX)
              return [DX, Dy]
function_tokens: def _grad ( self , values ) : X = values [ 0 ] y = values [ 1 ] if y <= 0 : return [ None , None ] else : # DX = 2X/y, Dy = -||X||^2_2/y^2 if self . args [ 0 ] . is_complex ( ) : Dy = - ( np . square ( X . real ) + np . square ( X . imag ) ) . sum ( ) / np . square ( y ) else : Dy = - np . square ( X ) . sum ( ) / np . square ( y ) Dy = sp . csc_matrix ( Dy ) DX = 2.0 * X / y DX = np . reshape ( DX , ( self . args [ 0 ] . size , 1 ) ) DX = scipy . sparse . csc_matrix ( DX ) return [ DX , Dy ]