示例#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)