コード例 #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