def setup_class(self): self.ops = LogOperations(2)
def test_exp_func2(): ops = LogOperations(0.5) assert np.allclose([0.5**1, 0.5**2, 0.5**3], ops.exp([1, 2, 3]))
def test_log_func2(): ops = LogOperations(2) assert np.allclose( [np.log2(1), np.log2(2), np.log2(3)], ops.log([1, 2, 3]))
def setUp(self): self.ops = LogOperations(2)