예제 #1
0
파일: test_af.py 프로젝트: matze/af
def test_cost_stddev():
    x = np.array([-100.0, 100.0])
    assert af.cost_stddev(x) == 1.0
예제 #2
0
파일: test_af.py 프로젝트: matze/af
def test_cost_stddev_range():
    image = np.random.randn(100).reshape(10, 10)
    r = af.cost_stddev(image)
    assert r >= 0.0 and r <= 1.0