예제 #1
0
파일: test_ops.py 프로젝트: psychon7/dit
 def setup_class(self):
     self.ops = LogOperations(2)
예제 #2
0
파일: test_ops.py 프로젝트: psychon7/dit
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]))
예제 #3
0
파일: test_ops.py 프로젝트: psychon7/dit
def test_log_func2():
    ops = LogOperations(2)
    assert np.allclose(
        [np.log2(1), np.log2(2), np.log2(3)], ops.log([1, 2, 3]))
예제 #4
0
 def setUp(self):
     self.ops = LogOperations(2)