8000 MRG/REL fixes /skips for 32bit tests by amueller · Pull Request #11879 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

MRG/REL fixes /skips for 32bit tests #11879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sklearn/svm/tests/test_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from sklearn.utils.extmath import safe_sparse_dot
from sklearn.utils.testing import (assert_raises, assert_true, assert_false,
assert_warns, assert_raise_message,
ignore_warnings)
ignore_warnings, skip_if_32bit)

# test sample 1
X = np.array([[-2, -1], [-1, -1], [-1, -2], [1, 1], [1, 2], [2, 1]])
Expand Down Expand Up @@ -71,6 +71,7 @@ def check_svm_model_equal(dense_svm, sparse_svm, X_train, y_train, X_test):
assert_raise_message(ValueError, msg, dense_svm.predict, X_test)


@skip_if_32bit
def test_svc():
"""Check that sparse SVC gives the same result as SVC"""
# many class dataset:
Expand Down Expand Up @@ -265,6 +266,7 @@ def test_sparse_liblinear_intercept_handling():
test_svm.test_dense_liblinear_intercept_handling(svm.LinearSVC)


@skip_if_32bit
def test_sparse_oneclasssvm():
# Check that sparse OneClassSVM gives the same result as dense OneClassSVM
# many class dataset:
Expand Down
2 changes: 1 addition & 1 deletion sklearn/utils/estimator_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ def check_outliers_train(name, estimator_orig, readonly_memmap=True):
y_scores = estimator.score_samples(X)
assert y_scores.shape == (n_samples,)
y_dec = y_scores - estimator.offset_
assert_array_equal(y_dec, decision)
assert_allclose(y_dec, decision)

# raises error on malformed input for score_samples
assert_raises(ValueError, estimator.score_samples, X.T)
Expand Down
0