I have two 1-d arrays (a and b) containing strings, which I want to compare element wise to get output c like shown below. I tried converting it to set and comparing, however that does not give the correct solution. Also logical_xor does not work for string. I can write a loop to do this but then it defeats the purpose of using arrays, What can be the best way to do this without a loop?
>> aarray(['S', 'S', 'D', 'S', 'N', 'S', 'A', 'S', 'M'], dtype='|S1')>> barray(['T', 'I', 'D', 'N', 'G', 'B', 'A', 'J', 'M'], dtype='|S1')>> c array([False, False, True, False, False, False, True, False, True], dtype=bool)