def assert_entirely_equal(observed, expected):
try:<EOL><INDENT>assert observed == expected<EOL><DEDENT>except AssertionError:<EOL><INDENT>assert np.isnan(observed) and np.isnan(expected)<EOL><DEDENT>except ValueError:<EOL><INDENT>assert (observed == expected).all()<EOL><DEDENT>
Accommodate equality assertion for varied data, including NaN.