'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):

    value = intf.from_2D_to_1D(values[0].flatten().T)
    indices = np.argsort((- value))[:int(self.k)]
    D = np.zeros(((self.args[0].size[0] * self.args[0].size[1]), 1))
    D[indices] = 1
    return [sp.csc_matrix(D)]
