#NEWLINE# def test_rechunk_1d( ) : #NEWLINE# #INDENT# 'Try rechunking a random 1d matrix' #NEWLINE# a = np . random . uniform ( 0 , 1 , 300 ) #NEWLINE# x = da . from_array ( a , chunks = ( ( ( 100 , ) * 3 ) , ) ) #NEWLINE# new = ( ( ( 50 , ) * 6 ) , ) #NEWLINE# x2 = rechunk ( x , chunks = new ) #NEWLINE# assert ( x2 . chunks == new ) #NEWLINE# assert np . all ( ( x2 . compute ( ) == a ) )