Created
June 13, 2016 18:28
-
-
Save cfperez/0e32572599785e9075e29a3c6c9ba3a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def arrays_equal_nan(a, b): | |
'Arrays compare True if they are equal or both NaN, else False' | |
return np.all((a==b) | ((a!=a) & (b!=b))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment