def test_log_polynomial(self): op_1 = Operand([0, 1]) op_2 = Operand([2]) with self.assertRaises(NotImplementedError): op_1.log(op_2) with self.assertRaises(NotImplementedError): op_2.log(op_1)
def test_log(self): op_1 = Operand([2.71828]) op_2 = Operand([7.35928]) self.assertAlmostEqual(op_2.log(op_1).polynomial[0], 2, places=2)