-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate cudf.isclose #17351
Deprecate cudf.isclose #17351
Changes from all commits
8664fad
e683647
9cc9071
c418cb2
e4de8e4
aeb6a30
03ac845
d514517
43f2f68
18b40dc
ba21673
02c35bf
302e625
5f9a97f
384abae
9c5cd81
c7bfa77
03c055f
56061bd
7158ee0
05365af
6f83b58
fc08fe8
a2a62a1
3111aa4
698a716
664fd87
be9ba6c
d01f332
2e88835
110ed4c
f550ccc
2cde861
04502c8
f87f017
332cc06
cd0c0d0
d927992
e52df19
68c4285
0d9e577
c46e9e4
1bfc114
f54c1a5
ffeea05
78db66b
b2419dd
305182e
2827a03
53e4525
5a89d00
881afd1
092fdff
8b7127f
d1d4420
44b2e79
8d8cd78
d93e9c2
f05e89d
4e3afd2
ccc8833
df17740
d8277bf
0bd95c9
ab36fc6
79a9860
d10eae7
e7022fb
f5954a4
b89728b
165d756
776ef54
d714173
fa62ff4
797a07b
4533085
6e91f09
6eaa65f
6d8ec80
83f0ae0
0495071
3133b5a
adaee75
9db132a
2c89dba
2be82fe
9b88794
891a865
b084d74
4de7e7a
4b2dc33
3e418dd
5190b44
6884867
d1bad33
852338e
da72cf6
b67c0a9
12c77f3
3785a48
4696bbf
d3e94d4
beb4296
7cc9a9f
541e7e8
1b01df3
439321e
86d833b
de1f809
3ca188d
6440207
38820ff
43fac3b
4505c53
351ece5
cd3e352
47e49d0
1b82963
fbc3256
06e937b
c0a4c6c
84690b5
169a45a
38261f8
c791f80
467cf7a
1a62b46
b6f7e6e
cbeefd8
14b4321
80fc629
a0fc6a8
0f5d4b9
ba3ed57
ed2892c
a79077c
f595592
5b412dc
9df95d1
ebad043
4764395
c53ace8
e16b3a3
13e983e
3468e92
2f5bf76
5306eca
657f50b
f904a7f
be62ea6
1e95864
0c5bd66
cd3a79b
3801e74
63c5a38
ebe5bad
32548b0
78e5c0d
00ed1f2
98d9856
92652be
f811c38
8a3e5f1
7749702
5baaf6d
48aa08f
f3f159a
a095727
62669e0
4d6925c
1a67646
34e2045
76b35ad
e9744b4
469f226
e975ca3
a5ac4bf
e9e34e6
5802d34
c650bf7
187053a
becfacc
0058b52
e5753e3
d742599
24aacb2
267c7f2
b9760ac
fb896f3
b096182
f3caf09
a081a57
8e2949f
d27c5e5
6159c39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5322,6 +5322,29 @@ def isclose(a, b, rtol=1e-05, atol=1e-08, equal_nan=False): | |
5 False | ||
dtype: bool | ||
""" | ||
warnings.warn( | ||
"`cudf.close` is deprecated and will be removed in a future version of cudf. " | ||
''' | ||
import cupy as cp | ||
import pandas as pd | ||
from cudf.core.column import ( | ||
as_column, | ||
) | ||
|
||
a = pd.array([1.0, 2.0, None]) | ||
b = pd.array([1.0, 2.1, None]) | ||
|
||
a_col = as_column(a) | ||
a_array = cupy.asarray(a_col.data_array_view(mode="read")) | ||
|
||
b_col = as_column(b) | ||
b_array = cupy.asarray(b_col.data_array_view(mode="read")) | ||
|
||
result = cp.isclose(a, b, equal_nan=True) | ||
print(result) # Output: [ True False True] | ||
''', | ||
Comment on lines
+5327
to
+5345
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We noted in #13593: "As part of the deprecation, we decided to add a warning message indicating how to support nulls while using cupy.isclose." However, I am not sure if this is the right code snippet. The code we want to give to the user as a replacement for this deprecated code path is essentially the current implementation in this method. Basically it has two steps:
I would suggest we add this snippet to the page "Working with missing data": https://docs.rapids.ai/api/cudf/stable/user_guide/missing-data/ Then we can link to this snippet in the docs from the deprecated method's docstring and in the deprecation warning. Does that make sense? Let me know if you have questions. |
||
FutureWarning | ||
) | ||
|
||
if not can_convert_to_column(a): | ||
raise TypeError( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.