Example #1
0
def test_normalize_row():
    norm_data = normalize(data, normalize='row')
    assert np.allclose(np.mean(np.vstack(norm_data), axis=1),0)
Example #2
0
def test_normalize_within():
    norm_data = normalize(data, normalize='within')
    assert np.allclose([np.mean(i,axis=0) for i in norm_data],0)
Example #3
0
def test_normalize_returns_list():
    assert type(normalize(data)) is list
Example #4
0
def test_normalize_across():
    norm_data = normalize(data, normalize='across')
    assert np.allclose(np.mean(np.vstack(norm_data),axis=0),0)
Example #5
0
def test_normalize_geo():
    geo = plot(data, show=False)
    norm_data = normalize(geo, normalize='row')
    assert np.allclose(np.mean(np.vstack(norm_data), axis=1),0)