def test_is_pyramid(): data = np.random.random((10, 15)) assert not is_pyramid(data) data = np.random.random((10, 15, 6)) assert not is_pyramid(data) data = [np.random.random((10, 15, 6))] assert not is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((10, 15, 6))] assert not is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((5, 7, 3))] assert is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((10, 7, 3))] assert is_pyramid(data) data = tuple(data) assert is_pyramid(data) data = tuple( pyramid_gaussian(np.random.random((10, 15)), multichannel=False)) assert is_pyramid(data) data = np.asarray( tuple(pyramid_gaussian(np.random.random((10, 15)), multichannel=False))) assert is_pyramid(data)
def test_is_pyramid(): data = np.random.random((10, 15)) assert not is_pyramid(data) data = np.random.random((10, 15, 6)) assert not is_pyramid(data) data = [np.random.random((10, 15, 6))] assert not is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((10, 15, 6))] assert not is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((5, 7, 3))] assert is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((10, 7, 3))] assert is_pyramid(data) data = tuple(data) assert is_pyramid(data) data = tuple( pyramid_gaussian(np.random.random((10, 15)), multichannel=False)) assert is_pyramid(data) data = np.asarray( tuple(pyramid_gaussian(np.random.random((10, 15)), multichannel=False))) assert is_pyramid(data) # Check for integer overflow with big data s = 8192 data = [ da.ones((s, ) * 3), da.ones((s // 2, ) * 3), da.ones((s // 4, ) * 3) ] assert is_pyramid(data)
def test_is_pyramid(): data = np.random.random((10, 15)) assert not is_pyramid(data) data = np.random.random((10, 15, 6)) assert not is_pyramid(data) data = [np.random.random((10, 15, 6))] assert not is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((10, 15, 6))] assert not is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((5, 7, 3))] assert is_pyramid(data) data = [np.random.random((10, 15, 6)), np.random.random((10, 7, 3))] assert is_pyramid(data)
def test_timing_is_pyramid_big(): assert not is_pyramid(data_dask)