@@ -745,7 +745,7 @@ def z(x, y):
745745
746746
747747@image_comparison (baseline_images = ['tri_smooth_contouring' ],
748- extensions = ['png' ], remove_text = True )
748+ extensions = ['png' ], remove_text = True , tol = 0.07 )
749749def test_tri_smooth_contouring ():
750750 # Image comparison based on example tricontour_smooth_user.
751751 n_angles = 20
@@ -786,8 +786,7 @@ def z(x, y):
786786
787787
788788@image_comparison (baseline_images = ['tri_smooth_gradient' ],
789- extensions = ['png' ], remove_text = True ,
790- tol = 0.03 if on_win else 0 )
789+ extensions = ['png' ], remove_text = True , tol = 0.035 )
791790def test_tri_smooth_gradient ():
792791 # Image comparison based on example trigradient_demo.
793792
@@ -1123,3 +1122,14 @@ def test_internal_cpp_api():
11231122 with pytest .raises (ValueError ) as excinfo :
11241123 trifinder .find_many ([0 ], [0 , 1 ])
11251124 excinfo .match (r'x and y must be array_like with same shape' )
1125+
1126+
1127+ def test_qhull_large_offset ():
1128+ # github issue 8682.
1129+ x = np .asarray ([0 , 1 , 0 , 1 , 0.5 ])
1130+ y = np .asarray ([0 , 0 , 1 , 1 , 0.5 ])
1131+
1132+ offset = 1e10
1133+ triang = mtri .Triangulation (x , y )
1134+ triang_offset = mtri .Triangulation (x + offset , y + offset )
1135+ assert len (triang .triangles ) == len (triang_offset .triangles )
0 commit comments