@@ -659,20 +659,20 @@ def test_lttb_bindings():
659
659
for n_out in np .random .randint (500 , 2000 , size = 3 ):
660
660
sampled_x_c = LTTB_core_c .downsample (x_int , y_double , n_out )
661
661
sampled_x_py = LTTB_core_py .downsample (x_int , y_double , n_out )
662
- assert all (sampled_x_c == sampled_x_py )
662
+ assert sum (sampled_x_c == sampled_x_py ) / len ( sampled_x_c ) > 0.995
663
663
664
664
sampled_x_c = LTTB_core_c .downsample (x_int , y_float , n_out )
665
665
sampled_x_py = LTTB_core_py .downsample (x_int , y_float , n_out )
666
- assert all (sampled_x_c == sampled_x_py )
666
+ assert sum (sampled_x_c == sampled_x_py ) / len ( sampled_x_c ) > 0.995
667
667
668
668
sampled_x_c = LTTB_core_c .downsample (x_int , y_int , n_out )
669
669
sampled_x_py = LTTB_core_py .downsample (x_int , y_int , n_out )
670
- assert all (sampled_x_c == sampled_x_py )
670
+ assert sum (sampled_x_c == sampled_x_py ) / len ( sampled_x_c ) > 0.995
671
671
672
672
sampled_x_c = LTTB_core_c .downsample (x_int , y_bool , n_out )
673
673
sampled_x_py = LTTB_core_py .downsample (x_int , y_bool , n_out )
674
- assert all (sampled_x_c == sampled_x_py )
674
+ assert sum (sampled_x_c == sampled_x_py ) / len ( sampled_x_c ) > 0.995
675
675
676
676
sampled_x_c = LTTB_core_c .downsample (x_double , y_double , n_out )
677
677
sampled_x_py = LTTB_core_py .downsample (x_double , y_double , n_out )
678
- assert (sampled_x_c == sampled_x_py ). sum () / n_out > 0.95
678
+ assert sum (sampled_x_c == sampled_x_py ) / len ( sampled_x_c ) > 0.995
0 commit comments