Beispiel #1
0
def test_clr_inv():
    x = np.array([1, 2, 3, 4]) / 10
    x_clr = clr(x)
    y = clr_inv(x_clr)
    assert_equal_shape(x, y)
    assert_almost_equal_array(x, y)

    x = np.array([[1, 2, 3, 4], [2, 2, 2, 4]]) / 10
    x_clr = clr(x)
    y = clr_inv(x_clr)
    assert_equal_shape(x, y)
    assert_almost_equal_array(x, y)
Beispiel #2
0
def test_clr_inv():
    x = np.array([1, 2, 3, 4]) / 10
    x_clr = clr(x)
    y = clr_inv(x_clr)
    assert x.shape == y.shape
    assert np.allclose(x, y)

    x = np.array([[1, 2, 3, 4], [2, 2, 2, 4]]) / 10
    x_clr = clr(x)
    y = clr_inv(x_clr)
    assert x.shape == y.shape
    assert np.allclose(x, y)
Beispiel #3
0
def test_clr_inv():
    x = np.array([1, 2, 3, 4]) / 10
    x_clr = clr(x)
    y = clr_inv(x_clr)
    assert_equal_shape(x, y)
    assert_almost_equal_array(x, y)

    x = np.array([[1, 2, 3, 4], [2, 2, 2, 4]]) / 10
    x_clr = clr(x)
    y = clr_inv(x_clr)
    assert_equal_shape(x, y)
    assert_almost_equal_array(x, y)