You messed up your De Morgan's theorem! =)

`~(np.isnan(attr1) & np.isnan(attr2))`

or

`~np.isnan(attr1) | ~np.isnan(attr2)`

Actually though, what should be returned is

`return np.all(attr1[not_both_nan] == attr2[not_both_nan])`