Commit f6dcf0a9 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

TEST: tweak redundant parallel test

parent a1bb072e
......@@ -12,6 +12,8 @@ import multiprocessing as mp
import io
from unittest import mock
import numpy as np
import pandas as pd
......@@ -97,7 +99,8 @@ def test_removeIfRedundant():
def test_removeIfRedundant_parallel():
data = np.random.random((5000, 150))
colsz = 5000 * 8
data = np.random.random((5000, 150)).astype(np.float64)
df = pd.DataFrame(data)
corr = np.abs(np.triu(df.corr().values, 1))
thres = corr[corr > 0].mean()
......@@ -107,7 +110,10 @@ def test_removeIfRedundant_parallel():
seqdt = gen_DataTableFromDataFrame(df)
vids = range(1, 151)
parrem = pfns.removeIfRedundant(pardt, vids, thres)
with mock.patch('funpack.processing_functions'
'.removeIfRedundant.CHUNK_SIZE_LIMIT',
colsz * 10):
parrem = pfns.removeIfRedundant(pardt, vids, thres)
seqrem = pfns.removeIfRedundant(seqdt, vids, thres)
assert parrem == seqrem
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment