Solved by chetan_patil in post #2 
              
              
                You can use this code 
condition1 = ((b>0.5) & (0.5>a) & ((b-a)>0.5))
b[condition1]-=1

condition2 = ((a>0.5) & (0.5>b) & ((a-b)>0.5))
a[condition2]-=1