File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 11import functools
22import math
33import os
4+ import warnings
45from unittest .mock import patch
56
67import naive
@@ -1753,3 +1754,16 @@ def test_process_isconstant_2d():
17531754 T_subseq_isconstant_comp = core .process_isconstant (T , m , T_subseq_isconstant )
17541755
17551756 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 )
You can’t perform that action at this time.
0 commit comments