#NEWLINE# def test_iterator_and_numpy_chunks( ) : #NEWLINE# #INDENT# c = iterator_to_numpy_chunks ( [ 1 , 2 , 3 ] , chunksize = 2 ) #NEWLINE# assert isinstance ( c , chunks ( np . ndarray ) ) #NEWLINE# assert all ( ( isinstance ( c , np . ndarray ) for chunk in c ) ) #NEWLINE# c = iterator_to_numpy_chunks ( [ 1 , 2 , 3 ] , chunksize = 2 ) #NEWLINE# L = convert ( list , c ) #NEWLINE# assert ( L == [ 1 , 2 , 3 ] )