예제 #1
0
def test_normalize_1D():
    A = np.random.rand(2) + 1.0
    for axis in range(1):
        Anorm = mixture.normalize(A, axis)
        assert np.all(np.allclose(Anorm.sum(axis), 1.0))
예제 #2
0
def test_normalize_3D():
    A = rng.rand(2, 2, 2) + 1.0
    for axis in range(3):
        Anorm = mixture.normalize(A, axis)
        assert np.all(np.allclose(Anorm.sum(axis), 1.0))
예제 #3
0
def test_normalize_3D():
    A = np.random.rand(2, 2, 2) + 1.0
    for axis in range(3):
        Anorm = mixture.normalize(A, axis)
        assert np.all(np.allclose(Anorm.sum(axis), 1.0))