Esempio n. 1
0
def test_gm():
    """
    Make sure loggm and gm agree.

    """
    x = np.array([1, 2, 3, 4])
    gm = _gm(x)
    loggm = _log2_gm(x)
    assert np.allclose(np.log2(gm), loggm)
Esempio n. 2
0
def test_gm():
    """
    Make sure loggm and gm agree.

    """
    x = np.array([1, 2, 3, 4])
    gm = _gm(x)
    loggm = _log2_gm(x)
    np.testing.assert_allclose(np.log2(gm), loggm)