@@ -127,7 +127,7 @@ def test_get_data_with_rowid(self):
127127 #rval = self.dataset.get_pandas(include_row_id=False)
128128
129129 def test_get_sparse_dataset_with_rowid (self ):
130- self .sparse_dataset .row_id_attribute = "a_0"
130+ self .sparse_dataset .row_id_attribute = [ "a_0" ]
131131 rval , categorical = self .sparse_dataset .get_data (
132132 include_row_id = True , return_categorical_indicator = True )
133133 self .assertIsInstance (rval , np .ndarray )
@@ -147,7 +147,7 @@ def test_get_sparse_dataset_with_rowid(self):
147147 #rval = self.dataset.get_pandas(include_row_id=False)
148148
149149 def test_get_data_with_ignore_attributes (self ):
150- self .dataset .ignore_attributes = "condition"
150+ self .dataset .ignore_attributes = [ "condition" ]
151151 rval = self .dataset .get_data (include_ignore_attributes = True )
152152 self .assertEqual (rval .dtype , np .float32 )
153153 self .assertEqual (rval .shape , (898 , 39 ))
@@ -163,7 +163,7 @@ def test_get_data_with_ignore_attributes(self):
163163 # TODO test multiple ignore attributes!
164164
165165 def test_get_sparse_dataset_with_ignore_attributes (self ):
166- self .sparse_dataset .ignore_attributes = "a_0"
166+ self .sparse_dataset .ignore_attributes = [ "a_0" ]
167167 rval = self .sparse_dataset .get_data (include_ignore_attributes = True )
168168 self .assertIsInstance (rval , np .ndarray )
169169 self .assertEqual (rval .dtype , np .float32 )
@@ -183,8 +183,8 @@ def test_get_sparse_dataset_with_ignore_attributes(self):
183183 # TODO test multiple ignore attributes!
184184
185185 def test_get_data_rowid_and_ignore_and_target (self ):
186- self .dataset .ignore_attributes = "condition"
187- self .dataset .row_id_attribute = "hardness"
186+ self .dataset .ignore_attributes = [ "condition" ]
187+ self .dataset .row_id_attribute = [ "hardness" ]
188188 X , y = self .dataset .get_data (target = "class" , include_row_id = False ,
189189 include_ignore_attributes = False )
190190 self .assertEqual (X .dtype , np .float32 )
@@ -198,8 +198,8 @@ def test_get_data_rowid_and_ignore_and_target(self):
198198 self .assertEqual (y .shape , (898 , ))
199199
200200 def test_get_sparse_dataset_rowid_and_ignore_and_target (self ):
201- self .sparse_dataset .ignore_attributes = "a_0"
202- self .sparse_dataset .row_id_attribute = "a_1"
201+ self .sparse_dataset .ignore_attributes = [ "a_0" ]
202+ self .sparse_dataset .row_id_attribute = [ "a_1" ]
203203 X , y = self .sparse_dataset .get_data (
204204 target = "class" , include_row_id = False ,
205205 include_ignore_attributes = False )
0 commit comments