Skip to content

Commit

Permalink
Remove import of scalar_broadcast_to from stemmer (rapidsai#4706)
Browse files Browse the repository at this point in the history
Authors:
  - Victor Lafargue (https://github.com/viclafargue)
  - Dante Gama Dessavre (https://github.com/dantegd)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#4706
  • Loading branch information
viclafargue authored May 3, 2022
1 parent d99053d commit 97c7742
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020, NVIDIA CORPORATION.
# Copyright (c) 2020-2022, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,15 +18,14 @@
import cudf
import numpy as np
import cupy as cp
from cudf.utils.utils import scalar_broadcast_to


def get_str_replacement_series(replacement, bool_mask):
"""
Get replacement series with replacement at
Places marked by bool mask and empty other wise
"""
word_ser = cudf.Series(scalar_broadcast_to("", size=len(bool_mask)))
word_ser = cudf.Series(cudf.core.column.full(len(bool_mask), ""))
word_ser.iloc[bool_mask] = replacement

return word_ser
Expand Down
1 change: 1 addition & 0 deletions python/cuml/tests/test_text_feature_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ def test_hashingvectorizer_norm(norm):
assert_almost_equal_hash_matrices(res.todense().get(), ref.toarray())


@pytest.mark.xfail(reason="https://github.com/rapidsai/cuml/issues/4721")
def test_hashingvectorizer_alternate_sign():
# if alternate_sign = True
# we should have some negative and positive values
Expand Down

0 comments on commit 97c7742

Please sign in to comment.