Skip to content

Commit

Permalink
Merge branch 'rapidsai:branch-23.12' into branch-23.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekrom-7780 authored Nov 7, 2023
2 parents 03cec81 + 0296043 commit 76dc2e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion python/cuml/feature_extraction/_vectorizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,9 @@ def fit_transform(self, raw_documents, y=None):
if self._fixed_vocabulary:
self.vocabulary_ = self.vocabulary
else:
self.vocabulary_ = tokenized_df["token"].unique().sort_values()
self.vocabulary_ = (
tokenized_df["token"].drop_duplicates().sort_values()
)

count_df = self._count_vocab(tokenized_df)

Expand Down
2 changes: 1 addition & 1 deletion python/cuml/preprocessing/LabelEncoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def fit(self, y, _classes=None):
if _classes is not None:
self.classes_ = _classes
else:
self.classes_ = y.unique().sort_values(
self.classes_ = y.drop_duplicates().sort_values(
ignore_index=True
) # dedupe and sort

Expand Down

0 comments on commit 76dc2e0

Please sign in to comment.