@@ -47,14 +47,13 @@ def test_get_data_with_rowid(self):
4747 self .assertEqual (len (categorical ), 38 )
4848
4949 def test_get_data_with_target (self ):
50- X , y = self .dataset .get_data (target = "class" , target_dtype = int )
50+ X , y = self .dataset .get_data (target = "class" )
5151 self .assertIsInstance (X , np .ndarray )
5252 self .assertEqual (X .dtype , np .float32 )
5353 self .assertIn (y .dtype , [np .int32 , np .int64 ])
5454 self .assertEqual (X .shape , (898 , 38 ))
5555 X , y , attribute_names = self .dataset .get_data (
5656 target = "class" ,
57- target_dtype = int ,
5857 return_attribute_names = True
5958 )
6059 self .assertEqual (len (attribute_names ), 38 )
@@ -66,7 +65,6 @@ def test_get_data_rowid_and_ignore_and_target(self):
6665 self .dataset .row_id_attribute = ["hardness" ]
6766 X , y = self .dataset .get_data (
6867 target = "class" ,
69- target_dtype = int ,
7068 include_row_id = False ,
7169 include_ignore_attributes = False
7270 )
@@ -75,7 +73,6 @@ def test_get_data_rowid_and_ignore_and_target(self):
7573 self .assertEqual (X .shape , (898 , 36 ))
7674 X , y , categorical = self .dataset .get_data (
7775 target = "class" ,
78- target_dtype = int ,
7976 return_categorical_indicator = True ,
8077 )
8178 self .assertEqual (len (categorical ), 36 )
@@ -110,15 +107,14 @@ def setUp(self):
110107 self .sparse_dataset = openml .datasets .get_dataset (4136 )
111108
112109 def test_get_sparse_dataset_with_target (self ):
113- X , y = self .sparse_dataset .get_data (target = "class" , target_dtype = int )
110+ X , y = self .sparse_dataset .get_data (target = "class" )
114111 self .assertTrue (sparse .issparse (X ))
115112 self .assertEqual (X .dtype , np .float32 )
116113 self .assertIsInstance (y , np .ndarray )
117114 self .assertIn (y .dtype , [np .int32 , np .int64 ])
118115 self .assertEqual (X .shape , (600 , 20000 ))
119116 X , y , attribute_names = self .sparse_dataset .get_data (
120117 target = "class" ,
121- target_dtype = int ,
122118 return_attribute_names = True ,
123119 )
124120 self .assertTrue (sparse .issparse (X ))
@@ -184,7 +180,6 @@ def test_get_sparse_dataset_rowid_and_ignore_and_target(self):
184180 self .sparse_dataset .row_id_attribute = ["V512" ]
185181 X , y = self .sparse_dataset .get_data (
186182 target = "class" ,
187- target_dtype = int ,
188183 include_row_id = False ,
189184 include_ignore_attributes = False ,
190185 )
@@ -194,7 +189,6 @@ def test_get_sparse_dataset_rowid_and_ignore_and_target(self):
194189 self .assertEqual (X .shape , (600 , 19998 ))
195190 X , y , categorical = self .sparse_dataset .get_data (
196191 target = "class" ,
197- target_dtype = int ,
198192 return_categorical_indicator = True ,
199193 )
200194 self .assertTrue (sparse .issparse (X ))
0 commit comments