Skip to content

Commit 477d3b9

Browse files
author
Joao Felipe Rocha
committed
Error message is different from 3.8 and 3.10. Created a generic error message
1 parent eb1fccf commit 477d3b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def test_inverse_transform_sparse_svd():
387387
G.inverse_transform(G.data_nu, columns=data.shape[1])
388388

389389
# Flexible regex pattern that works across Python versions
390-
sparse_error_pattern = ".*sparse.*was passed, but dense data is required.*toarray.*to convert.*dense.*array.*"
390+
sparse_error_pattern = r".*sparse.*passed, but dense data is required.*toarray\(\).*dense numpy array.*"
391391
with assert_raises_message(
392392
TypeError,
393393
sparse_error_pattern,

0 commit comments

Comments
 (0)