MCPcopy
hub / github.com/mne-tools/mne-python / test_object_diff_with_nan

Function test_object_diff_with_nan

mne/utils/tests/test_numerics.py:340–349  ·  view source on GitHub ↗

Test object diff can handle NaNs.

()

Source from the content-addressed store, hash-verified

338
339
340def test_object_diff_with_nan():
341 """Test object diff can handle NaNs."""
342 d0 = np.array([1, np.nan, 0])
343 d1 = np.array([1, np.nan, 0])
344 d2 = np.array([np.nan, 1, 0])
345
346 assert object_diff(d0, d1) == ""
347 assert object_diff(d0, d2) != ""
348 assert object_diff(np.nan, np.nan) == ""
349 assert object_diff(np.nan, 3.5) == " value mismatch (nan, 3.5)\n"
350
351
352def test_hash():

Callers

nothing calls this directly

Calls 1

object_diffFunction · 0.90

Tested by

no test coverage detected