Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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