#NEWLINE# def test_image_as_masked( ) : #NEWLINE# #INDENT# img = Image ( np . random . rand ( 3 , 3 , 1 ) , copy = False ) #NEWLINE# m_img = img . as_masked ( ) #NEWLINE# assert ( type ( m_img ) == MaskedImage ) #NEWLINE# assert_allclose ( m_img . pixels , m_img . pixels )