8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d87e88 commit bb8d9a6Copy full SHA for bb8d9a6
sklearn/preprocessing/label.py
@@ -167,7 +167,7 @@ def transform(self, y):
167
elif self.new_labels == "nan":
168
# Create copy of array and return
169
y_array = np.array(y)
170
- z = np.zeros(y_array.shape)
+ z = np.zeros(y_array.shape, dtype=float)
171
172
# Find entries with new labels
173
missing_mask = np.in1d(y, diff)
@@ -180,7 +180,7 @@ def transform(self, y):
180
elif self.new_labels == "label":
181
182
183
+ z = np.zeros(y_array.shape, dtype=int)
184
185
186
0 commit comments