Ok, I have two different 2D numpy string arrays. One of the columns (the "token") should be tested where they need to be identical for any alphanumeric characters but not for other characters (because they might come from different encodings), and another column is only alphanumeric, so they can be tested for pure equality. Anytime they differ, a warning should be printed indicating the values of both columns in question.
I can do this easily iterating over the rows, like:
for row1, row2 in zip(array1, array2) :
if alpha_diff(row1[0], row2[0]) or row1[1] != row2[1] :
print....
but I was thinking there must be a more pythonic way of handling this that is more efficient, like creating a numpy ufunc or something.
Any ideas?