#NEWLINE# def test_compound_state( ) : #NEWLINE# #INDENT# d = core . Data ( x = [ 1 , 2 , 3 ] ) #NEWLINE# s = d . new_subset ( label = 'abc' ) #NEWLINE# s . subset_state = ( ( d . id [ 'x' ] > 2 ) | ( d . id [ 'x' ] < 1.5 ) ) #NEWLINE# d2 = clone ( d ) #NEWLINE# np . testing . assert_array_equal ( d2 . subsets [ 0 ] . to_mask ( ) , [ True , False , True ] )