'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.'

def _grad(self, values):

    X = values[0]
    y = values[1]
    if (y <= 0):
        return [None, None]
    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[0] * self.args[0].size[1]), 1))
        DX = scipy.sparse.csc_matrix(DX)
        return [DX, Dy]
