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

    dim = values[0].shape[self.axis]
    mat = np.zeros((dim, dim))
    for i in range(dim):
        for j in range((i + 1)):
            mat[(i, j)] = 1
    var = Variable(*self.args[0].size)
    if (self.axis == 0):
        grad = MulExpression(mat, var)._grad(values)[1]
    else:
        grad = RMulExpression(var, mat.T)._grad(values)[0]
    return [grad]
