99
1010
1111class TestDot :
12+ def setup_method (self ):
13+ numpy .random .seed (42 )
14+
1215 @pytest .mark .parametrize ("dtype" , get_all_dtypes ())
1316 def test_dot_ones (self , dtype ):
1417 n = 10 ** 5
@@ -355,6 +358,9 @@ def test_multi_dot(type):
355358
356359
357360class TestTensordot :
361+ def setup_method (self ):
362+ numpy .random .seed (87 )
363+
358364 @pytest .mark .parametrize ("dtype" , get_all_dtypes ())
359365 def test_tensordot_scalar (self , dtype ):
360366 a = 2
@@ -383,8 +389,7 @@ def test_tensordot(self, dtype, axes):
383389
384390 result = dpnp .tensordot (ia , ib , axes = axes )
385391 expected = numpy .tensordot (a , b , axes = axes )
386- # TODO: investigate the effect of factor, see SAT-6700
387- assert_dtype_allclose (result , expected , factor = 24 )
392+ assert_dtype_allclose (result , expected )
388393
389394 @pytest .mark .parametrize ("dtype" , get_complex_dtypes ())
390395 @pytest .mark .parametrize ("axes" , [- 3 , - 2 , - 1 , 0 , 1 , 2 ])
@@ -400,8 +405,7 @@ def test_tensordot_complex(self, dtype, axes):
400405
401406 result = dpnp .tensordot (ia , ib , axes = axes )
402407 expected = numpy .tensordot (a , b , axes = axes )
403- # TODO: investigate the effect of factor, see SAT-6700
404- assert_dtype_allclose (result , expected , factor = 24 )
408+ assert_dtype_allclose (result , expected )
405409
406410 @pytest .mark .parametrize ("dtype" , get_all_dtypes (no_bool = True ))
407411 @pytest .mark .parametrize (
@@ -426,8 +430,7 @@ def test_tensordot_axes(self, dtype, axes):
426430
427431 result = dpnp .tensordot (ia , ib , axes = axes )
428432 expected = numpy .tensordot (a , b , axes = axes )
429- # TODO: investigate the effect of factor, see SAT-6700
430- assert_dtype_allclose (result , expected , factor = 24 )
433+ assert_dtype_allclose (result , expected )
431434
432435 @pytest .mark .parametrize ("dtype1" , get_all_dtypes ())
433436 @pytest .mark .parametrize ("dtype2" , get_all_dtypes ())
@@ -443,8 +446,7 @@ def test_tensordot_input_dtype_matrix(self, dtype1, dtype2):
443446
444447 result = dpnp .tensordot (ia , ib )
445448 expected = numpy .tensordot (a , b )
446- # TODO: investigate the effect of factor, see SAT-6700
447- assert_dtype_allclose (result , expected , factor = 24 )
449+ assert_dtype_allclose (result , expected )
448450
449451 def test_tensordot_strided (self ):
450452 for dim in [1 , 2 , 3 , 4 ]:
@@ -500,6 +502,9 @@ def test_tensordot_error(self):
500502
501503
502504class TestVdot :
505+ def setup_method (self ):
506+ numpy .random .seed (42 )
507+
503508 @pytest .mark .parametrize ("dtype" , get_all_dtypes ())
504509 def test_vdot_scalar (self , dtype ):
505510 a = numpy .array ([3.5 ], dtype = dtype )
0 commit comments