From da6c5c24eb7143ded3b275784ae2d10345eb8e1c Mon Sep 17 00:00:00 2001
From: Nelson Liu <nelson.liu.2009@gmail.com>
Date: Thu, 18 Aug 2016 12:08:40 -0700
Subject: [PATCH] try to fix travis error

---
 sklearn/model_selection/tests/test_split.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sklearn/model_selection/tests/test_split.py b/sklearn/model_selection/tests/test_split.py
index 15aa9edb95..da61abeb4f 100644
--- a/sklearn/model_selection/tests/test_split.py
+++ b/sklearn/model_selection/tests/test_split.py
@@ -785,10 +785,11 @@ def train_test_split_pandas():
 
 def train_test_split_sparse():
     # check that train_test_split converts scipy sparse matrices to csr
+    X = np.arange(100).reshape((10, 10))
     sparse_types = [csr_matrix, csc_matrix, coo_matrix]
     for InputFeatureType in sparse_types:
-        X_sparse_matrix = InputFeatureType(X)
-        X_train, X_test = train_test_split(X_sparse_matrix)
+        X_s = InputFeatureType(X)
+        X_train, X_test = train_test_split(X_s)
         assert_true(isinstance(X_train, csr_matrix))
         assert_true(isinstance(X_test, csr_matrix))
 
-- 
GitLab