#NEWLINE# def test_image_from_vector( ) : #NEWLINE# #INDENT# pixels = np . random . rand ( 2 , 10 , 20 ) #NEWLINE# pixels2 = np . random . rand ( 2 , 10 , 20 ) #NEWLINE# image = Image ( pixels ) #NEWLINE# image2 = image . from_vector ( pixels2 . ravel ( ) ) #NEWLINE# assert np . all ( ( image2 . pixels == pixels2 ) )