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

Function test_array_equal_nan

mne/utils/tests/test_numerics.py:479–487  ·  view source on GitHub ↗

Test comparing arrays with NaNs.

()

Source from the content-addressed store, hash-verified

477
478
479def test_array_equal_nan():
480 """Test comparing arrays with NaNs."""
481 a = b = [1, np.nan, 0]
482 assert not np.array_equal(a, b) # this is the annoying behavior we avoid
483 assert _array_equal_nan(a, b)
484 b = [np.nan, 1, 0]
485 assert not _array_equal_nan(a, b)
486 a = b = [np.nan] * 2
487 assert _array_equal_nan(a, b)
488
489
490def test_julian_conversions():

Callers

nothing calls this directly

Calls 1

_array_equal_nanFunction · 0.90

Tested by

no test coverage detected