8000 modify common tests · scikit-learn/scikit-learn@fe4a8aa · GitHub
[go: up one dir, main page]

Skip to content

Commit fe4a8aa

Browse files
committed
modify common tests
1 parent 4dd790a commit fe4a8aa

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sklearn/tests/test_common.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
import sklearn
2626

27-
from sklearn.cluster.bicluster import BiclusterMixin
28-
from sklearn.decomposition import ProjectedGradientNMF
29-
3027
from sklearn.linear_model.base import LinearClassifierMixin
3128
from sklearn.utils.estimator_checks import (
3229
_yield_all_checks,

sklearn/utils/estimator_checks.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,11 @@ def check_fit_score_takes_y(name, Estimator):
688688
@ignore_warnings
689689
def check_estimators_dtypes(name, Estimator):
690690
rnd = np.random.RandomState(0)
691-
X_train_32 = 3 * rnd.uniform(1.0, 2.0, size=(20, 5)).astype(np.float32)
691+
if name in ["BoxCoxTransformer", "SpectralCoclustering",
692+
"SpectralBiclustering"]:
693+
X_train_32 = 3 * rnd.uniform(1., 2., size=(20, 5)).astype(np.float32)
694+
else:
695+
X_train_32 = 3 * rnd.uniform(size=(20, 5)).astype(np.float32)
692696
X_train_64 = X_train_32.astype(np.float64)
693697
X_train_int_64 = X_train_32.astype(np.int64)
694698
X_train_int_32 = X_train_32.astype(np.int32)

0 commit comments

Comments
 (0)
0