def test_reduce(): from numpy import asarray dims = (10, 10, 10) area = dims[0] * dims[1] arr = asarray([repeat(x,area).reshape(dims[0], dims[1]) for x in range(dims[2])]) b = array(arr) # Test all generic reduce functionality generic.reduce_suite(arr, b)
def test_reduce(sc): from numpy import asarray dims = (10, 10, 10) area = dims[0] * dims[1] arr = asarray([repeat(x, area).reshape(dims[0], dims[1]) for x in range(dims[2])]) b = array(arr, sc, axis=0) # Test all reduce functionality when the base array is split after the first axis generic.reduce_suite(arr, b) # Split the BoltArraySpark after the second axis and rerun the tests b = array(arr, sc, axis=(0, 1)) generic.reduce_suite(arr, b) # Split the BoltArraySpark after the third axis (scalar values) and rerun the tests b = array(arr, sc, axis=(0, 1, 2)) generic.reduce_suite(arr, b)
def test_reduce(sc): from numpy import asarray dims = (10, 10, 10) area = dims[0] * dims[1] arr = asarray( [repeat(x, area).reshape(dims[0], dims[1]) for x in range(dims[2])]) b = array(arr, sc, axis=0) # Test all reduce functionality when the base array is split after the first axis generic.reduce_suite(arr, b) # Split the BoltArraySpark after the second axis and rerun the tests b = array(arr, sc, axis=(0, 1)) generic.reduce_suite(arr, b) # Split the BoltArraySpark after the third axis (scalar values) and rerun the tests b = array(arr, sc, axis=(0, 1, 2)) generic.reduce_suite(arr, b)