Skip to content

Commit

Permalink
Fix nightly CI: remove deprecated creation of columns by using explic…
Browse files Browse the repository at this point in the history
…it dtype (#5880)

After turning warnings as errors in pytests, the following error is blocking nightly (and I presume PR) CI: 

```python
================================================================================================================================================= short test summary info ==================================================================================================================================================
FAILED cuml/tests/test_array.py::test_get_set_item - FutureWarning: Setting an item of incompatible dtype is deprecated and will raise in a future error of pandas. Value '1.0' has dtype incompatible with int8, please explicitly cast to a compatible dtype first.
```

This PR fixes that by explicitly assigning columns with the correct type scalars.

Authors:
  - Dante Gama Dessavre (https://github.com/dantegd)

Approvers:
  - Divye Gala (https://github.com/divyegala)

URL: #5880
  • Loading branch information
dantegd authored May 3, 2024
1 parent 5754ec4 commit 83fc3b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/cuml/tests/test_array.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020-2023, NVIDIA CORPORATION.
# Copyright (c) 2020-2024, 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 Down Expand Up @@ -251,8 +251,8 @@ def test_get_set_item(inp, indices, mem_type):
_assert_equal(inp_view, ary[indices])

# Check equality after assigning to array slice.
ary[indices] = 1.0
inp[indices] = 1.0
ary[indices] = inp.dtype.type(1.0)
inp[indices] = inp.dtype.type(1.0)

# We need to assume that inp is not a cudf.Series here, otherwise
# ary.to_output("cupy") called by equal() will trigger a
Expand Down

0 comments on commit 83fc3b7

Please sign in to comment.