From 2999a2f544cd56575d940d7ab359819b392cccae Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <debian@onerussian.com>
Date: Mon, 21 Dec 2015 21:02:33 -0500
Subject: [PATCH] * debian/tests/deb_tests_lower_precision - to lower precision
 of test_feature_importances to avoid FTBFS on some (BE) platforms

---
 debian/changelog                         |  5 ++++-
 debian/patches/deb_tests_lower_precision | 11 +++++++++++
 debian/patches/series                    |  1 +
 3 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/deb_tests_lower_precision

diff --git a/debian/changelog b/debian/changelog
index ca03be3d0e..3d0bc3139c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,8 +6,11 @@ scikit-learn (0.17.0-3) unstable; urgency=medium
   * debian/rules
     - boost minimal Cython version for recythonization to 0.23.1.
       Should enable back bakckports on older Debian/Ubuntus
+  * debian/tests/deb_tests_lower_precision
+    - to lower precision of test_feature_importances to avoid FTBFS on some
+      (BE) platforms
 
- -- Yaroslav Halchenko <debian@onerussian.com>  Mon, 21 Dec 2015 20:38:42 -0500
+ -- Yaroslav Halchenko <debian@onerussian.com>  Mon, 21 Dec 2015 21:02:16 -0500
 
 scikit-learn (0.17.0-2) unstable; urgency=medium
 
diff --git a/debian/patches/deb_tests_lower_precision b/debian/patches/deb_tests_lower_precision
new file mode 100644
index 0000000000..74934f6d62
--- /dev/null
+++ b/debian/patches/deb_tests_lower_precision
@@ -0,0 +1,11 @@
+--- a/sklearn/feature_selection/tests/test_from_model.py
++++ b/sklearn/feature_selection/tests/test_from_model.py
+@@ -92,7 +92,7 @@ def test_feature_importances():
+     importances = transformer.estimator_.feature_importances_
+     transformer.fit(X, y, sample_weight=3 * sample_weight)
+     importances_bis = transformer.estimator_.feature_importances_
+-    assert_almost_equal(importances, importances_bis)
++    assert_almost_equal(importances, importances_bis, decimal=5)
+ 
+     # For the Lasso and related models, the threshold defaults to 1e-5
+     transformer = SelectFromModel(estimator=Lasso(alpha=0.1))
diff --git a/debian/patches/series b/debian/patches/series
index 3a6c76c300..fcb92bf2f0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ deb_git_revision_cmd
 deb_no_plot_gallery
 deb_optional_linkcode
 deb_nopaypal
+deb_tests_lower_precision
-- 
GitLab