'Test abs.'

def test_abs(self):

    expr = abs(self.A)
    self.A.value = [[1, 2], [(-1), 0]]
    val = (np.zeros((4, 4)) + np.diag([1, 1, (-1), 0]))
    self.assertItemsAlmostEqual(expr.grad[self.A].todense(), val)
