@@ -421,13 +421,16 @@ def test_check_X_domain_multi_nd():
421421 check_X_domain (X , sample_domain = sample_domain , allow_nd = True )
422422
423423 # Test with allow_nd=False (should raise an error)
424- with pytest .raises (ValueError , match = "Found array with dim 3. None expected <= 2." ):
424+ with pytest .raises (
425+ ValueError , match = "Found array with dim 3, while dim <= 2 is required."
426+ ):
425427 check_X_domain (X , sample_domain = sample_domain , allow_nd = False )
426428
427429
428430def test_check_X_y_domain_multi_nd ():
429431 # Create a 3D array for X (10 samples, 2 features, 3 channels)
430432 X = np .random .rand (10 , 2 , 3 )
433+
431434 # Create a 2D array for y (10 samples, 2 outputs)
432435 y = np .random .rand (10 , 2 )
433436 sample_domain = np .array ([1 ] * 5 + [- 1 ] * 5 )
@@ -436,7 +439,9 @@ def test_check_X_y_domain_multi_nd():
436439 check_X_y_domain (X , y , sample_domain = sample_domain , allow_nd = True )
437440
438441 # Test with allow_nd=False (should raise an error for X)
439- with pytest .raises (ValueError , match = "Found array with dim 3. None expected <= 2." ):
442+ with pytest .raises (
443+ ValueError , match = "Found array with dim 3, while dim <= 2 is required."
444+ ):
440445 check_X_y_domain (X , y , sample_domain = sample_domain , allow_nd = False )
441446
442447
0 commit comments