Skip to content

Commit

Permalink
update api and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Feb 26, 2025
1 parent 3275f3c commit 6ebdc85
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 0 additions & 3 deletions python/cudf/cudf/pandas/fast_slow_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,9 +1357,6 @@ def as_proxy_object(obj: Any) -> Any:
if _is_final_type(obj):
typ = get_final_type_map()[type(obj)]
return typ._fsproxy_wrap(obj, None)
elif _is_intermediate_type(obj):
typ = get_intermediate_type_map()[type(obj)]
return typ._fsproxy_wrap(obj, None)
return obj


Expand Down
7 changes: 7 additions & 0 deletions python/cudf/cudf_pandas_tests/test_cudf_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -2060,6 +2060,13 @@ def test_as_proxy_object_doesnot_copy_index():
assert proxy_obj._fsproxy_wrapped is idx


def test_as_proxy_object_no_op_for_intermediates():
s = pd.Series(["abc", "def", "ghi"])
str_attr = s.str
proxy_obj = as_proxy_object(str_attr)
assert proxy_obj is str_attr


def test_pickle_round_trip_proxy_numpy_array(array):
arr, proxy_arr = array
pickled_arr = BytesIO()
Expand Down

0 comments on commit 6ebdc85

Please sign in to comment.