#NEWLINE# def test_periodic( ) : #NEWLINE# #INDENT# x = np . arange ( 64 ) . reshape ( ( 8 , 8 ) ) #NEWLINE# d = da . from_array ( e , chunks = ( 4 , 4 ) ) #NEWLINE# e = periodic ( d , axis = 0 , depth = 2 ) #NEWLINE# assert ( e . shape [ 0 ] == ( d . shape [ 0 ] + 4 ) ) #NEWLINE# assert ( e . shape [ 1 ] == d . shape [ 1 ] ) #NEWLINE# assert eq ( e [ 1 , : ] , d [ ( - 1 ) , : ] ) #NEWLINE# assert eq ( e [ 0 , : ] , d [ ( - 2 ) , : ] )