We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3077d0d commit 47884e6Copy full SHA for 47884e6
1 file changed
tests/test_core.py
@@ -1,6 +1,7 @@
1
import functools
2
import math
3
import os
4
+import warnings
5
from unittest.mock import patch
6
7
import naive
@@ -1753,3 +1754,16 @@ def test_process_isconstant_2d():
1753
1754
T_subseq_isconstant_comp = core.process_isconstant(T, m, T_subseq_isconstant)
1755
1756
npt.assert_array_equal(T_subseq_isconstant_ref, T_subseq_isconstant_comp)
1757
+
1758
1759
+def test_preprocess_diagonal_std_inverse():
1760
+ T = np.random.rand(64)
1761
+ m = 3
1762
+ T[:m] = np.nan
1763
1764
+ with warnings.catch_warnings(record=True) as w:
1765
+ warnings.simplefilter("always")
1766
+ core.preprocess_diagonal(T, m)
1767
+ for item in w:
1768
+ if issubclass(item.category, RuntimeWarning):
1769
+ assert "divide by zero encountered in divide" not in str(item.message)
0 commit comments