#NEWLINE# def test_polygon_both_categorical_empty( self ) : #NEWLINE# #INDENT# d = Data ( x = [ 'a' , 'b' , 'c' , 'd' , 'b' , 'c' ] , y = [ 'p' , 'q' , 'r' , 's' , 's' , 'q' ] ) #NEWLINE# x_comp = d . get_component ( d . id [ 'x' ] ) #NEWLINE# y_comp = d . get_component ( d . id [ 'y' ] ) #NEWLINE# roi = PolygonalROI ( [ 0.5 , 0.6 , 0.6 , 0.5 ] , [ 0.5 , 0.5 , 0.6 , 0.5 ] ) #NEWLINE# s = x_comp . subset_from_roi ( 'x' , roi , other_comp = d , other_att = 'y' ) #NEWLINE# assert isinstance ( s , SubsetState ) #NEWLINE# np . testing . assert_array_equal ( s . to_mask ( d ) , [ False , False , False , False , False , False ] )