diff --git a/tests/preprocessing/test_encoders.py b/tests/preprocessing/test_encoders.py index 9680ac00e..8392f9d72 100644 --- a/tests/preprocessing/test_encoders.py +++ b/tests/preprocessing/test_encoders.py @@ -195,6 +195,6 @@ def test_unknown_category_transform_array(): enc.fit(dX) result = enc.transform(x2) - match = r"Block contains previously unseen values \['d'\].*\n+.*Block info" + match = r"Block contains previously unseen values" with pytest.raises(ValueError, match=match): result.compute() diff --git a/tests/test_svd.py b/tests/test_svd.py index 4475f7caf..66a5b9051 100644 --- a/tests/test_svd.py +++ b/tests/test_svd.py @@ -16,7 +16,7 @@ shape = 60, 55 n_samples, n_features = shape rng = check_random_state(42) -X = rng.randint(-100, 20, np.product(shape)).reshape(shape) +X = rng.randint(-100, 20, np.prod(shape)).reshape(shape) X = sp.csr_matrix(np.maximum(X, 0), dtype=np.float64) X.data[:] = 1 + np.log(X.data) Xdense = X.toarray()