def test_normalize_row(): norm_data = normalize(data, normalize='row') assert np.allclose(np.mean(np.vstack(norm_data), axis=1),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)
def test_normalize_returns_list(): assert type(normalize(data)) is list
def test_normalize_across(): norm_data = normalize(data, normalize='across') assert np.allclose(np.mean(np.vstack(norm_data),axis=0),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)