You could still numpify it, and it would read better:

```python
not_both_nan = True - np.isnan(attr1) * np.isnan(attr2)
return np.any(attr1[not_both_nan] != attr2[not_both_nan])
```