@@ -2743,7 +2743,9 @@ def test_p_is_permutation(self, dtype):
27432743
27442744 assert_allclose (P_np .sum (axis = 0 ), numpy .ones (5 , dtype = P_np .dtype ))
27452745 assert_allclose (P_np .sum (axis = 1 ), numpy .ones (5 , dtype = P_np .dtype ))
2746- assert_allclose (P_np .T @ P_np , numpy .eye (5 , dtype = P_np .dtype ), atol = 1e-15 )
2746+ assert_allclose (
2747+ P_np .T @ P_np , numpy .eye (5 , dtype = P_np .dtype ), atol = 1e-15
2748+ )
27472749
27482750 @pytest .mark .parametrize ("dtype" , get_float_complex_dtypes ())
27492751 def test_modes_consistency (self , dtype ):
@@ -2825,9 +2827,7 @@ def test_empty_p_indices(self, shape):
28252827 ],
28262828 )
28272829 def test_strided (self , sl ):
2828- base = self ._make_nonsingular_np (
2829- (7 , 7 ), dpnp .default_float_type (), "F"
2830- )
2830+ base = self ._make_nonsingular_np ((7 , 7 ), dpnp .default_float_type (), "F" )
28312831 a_np = base [sl ]
28322832 a_dp = dpnp .array (a_np )
28332833
@@ -2859,9 +2859,7 @@ def test_1d_input_raises(self):
28592859 @pytest .mark .parametrize ("bad" , [numpy .inf , - numpy .inf , numpy .nan ])
28602860 def test_check_finite_raises (self , bad ):
28612861 a_dp = dpnp .array ([[1.0 , 2.0 ], [3.0 , bad ]], order = "F" )
2862- assert_raises (
2863- ValueError , dpnp .scipy .linalg .lu , a_dp , check_finite = True
2864- )
2862+ assert_raises (ValueError , dpnp .scipy .linalg .lu , a_dp , check_finite = True )
28652863
28662864 def test_check_finite_disabled (self ):
28672865 a_dp = dpnp .array ([[1.0 , numpy .nan ], [3.0 , 4.0 ]])
@@ -2976,8 +2974,12 @@ def test_modes_consistency_batched(self, dtype):
29762974 a_np = self ._make_nonsingular_nd_np ((3 , 4 , 4 ), dtype , "F" )
29772975 a_dp = dpnp .array (a_np , order = "F" )
29782976 A_cast = a_dp .astype (
2979- dpnp .complex128 if dpnp .issubdtype (dtype , dpnp .complexfloating )
2980- else dpnp .float64 , copy = False
2977+ (
2978+ dpnp .complex128
2979+ if dpnp .issubdtype (dtype , dpnp .complexfloating )
2980+ else dpnp .float64
2981+ ),
2982+ copy = False ,
29812983 )
29822984
29832985 P , L , U = dpnp .scipy .linalg .lu (a_dp )
@@ -3057,9 +3059,7 @@ def test_singular_matrix(self):
30573059 def test_check_finite_raises (self ):
30583060 a = dpnp .ones ((2 , 3 , 3 ), dtype = dpnp .default_float_type (), order = "F" )
30593061 a [1 , 0 , 0 ] = dpnp .nan
3060- assert_raises (
3061- ValueError , dpnp .scipy .linalg .lu , a , check_finite = True
3062- )
3062+ assert_raises (ValueError , dpnp .scipy .linalg .lu , a , check_finite = True )
30633063
30643064
30653065class TestMatrixPower :
0 commit comments