#NEWLINE# def test_as_greyscale_channels( ) : #NEWLINE# #INDENT# image = Image ( np . random . randn ( 3 , 120 , 120 ) , copy = False ) #NEWLINE# new_image = image . as_greyscale ( mode = 'channel' , channel = 0 ) #NEWLINE# assert ( new_image . shape == image . shape ) #NEWLINE# assert ( new_image . n_channels == 1 ) #NEWLINE# assert_allclose ( image . pixels [ 0 ] , image . pixels [ 0 ] )