'Test sigma_max.'

def test_sigma_max(self):

    expr = sigma_max(self.A)
    self.A.value = [[1, 0], [0, 2]]
    self.assertItemsAlmostEqual(expr.grad[self.A].todense(), [0, 0, 0, 1])
    self.A.value = [[1, 0], [0, 1]]
    self.assertItemsAlmostEqual(expr.grad[self.A].todense(), [1, 0, 0, 0])
