@@ -268,7 +268,7 @@ def test_matrix_matrix_with_special_values(self, special_val):
268268
269269 def test_all_nan_matrix (self ):
270270 """Test matrices filled with NaN"""
271- A = create_quad_array ([float (' nan' )] * 4 , shape = (2 , 2 ))
271+ A = create_quad_array ([float (" nan" )] * 4 , shape = (2 , 2 ))
272272 B = create_quad_array ([1 , 2 , 3 , 4 ], shape = (2 , 2 ))
273273
274274 result = np .matmul (A , B )
@@ -281,7 +281,7 @@ def test_all_nan_matrix(self):
281281 def test_inf_times_zero_produces_nan (self ):
282282 """Test that Inf * 0 correctly produces NaN per IEEE 754"""
283283 # Create a scenario where Inf * 0 occurs in matrix multiplication
284- A = create_quad_array ([float (' inf' ), 1.0 ], shape = (1 , 2 ))
284+ A = create_quad_array ([float (" inf" ), 1.0 ], shape = (1 , 2 ))
285285 B = create_quad_array ([0.0 , 1.0 ], shape = (2 , 1 ))
286286
287287 result = np .matmul (A , B )
@@ -291,7 +291,7 @@ def test_inf_times_zero_produces_nan(self):
291291
292292 def test_nan_propagation (self ):
293293 """Test that NaN properly propagates through matrix operations"""
294- A = create_quad_array ([1.0 , float (' nan' ), 3.0 , 4.0 ], shape = (2 , 2 ))
294+ A = create_quad_array ([1.0 , float (" nan" ), 3.0 , 4.0 ], shape = (2 , 2 ))
295295 B = create_quad_array ([1.0 , 0.0 , 0.0 , 1.0 ], shape = (2 , 2 )) # Identity
296296
297297 result = np .matmul (A , B )
@@ -310,7 +310,7 @@ def test_zero_division_and_indeterminate_forms(self):
310310 # Test various indeterminate forms that should produce NaN
311311
312312 # Case: Inf - Inf form
313- A = create_quad_array ([float (' inf' ), float (' inf' )], shape = (1 , 2 ))
313+ A = create_quad_array ([float (" inf" ), float (" inf" )], shape = (1 , 2 ))
314314 B = create_quad_array ([1.0 , - 1.0 ], shape = (2 , 1 ))
315315
316316 result = np .matmul (A , B )
@@ -321,7 +321,7 @@ def test_zero_division_and_indeterminate_forms(self):
321321 def test_mixed_inf_values (self ):
322322 """Test matrices with mixed infinite values"""
323323 # Use all-ones matrix to avoid Inf * 0 = NaN issues
324- A = create_quad_array ([float (' inf' ), 2 , float (' -inf' ), 3 ], shape = (2 , 2 ))
324+ A = create_quad_array ([float (" inf" ), 2 , float (" -inf" ), 3 ], shape = (2 , 2 ))
325325 B = create_quad_array ([1 , 1 , 1 , 1 ], shape = (2 , 2 )) # All ones to avoid Inf*0
326326
327327 result = np .matmul (A , B )
0 commit comments