Skip to content

Commit

Permalink
document more
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Nov 9, 2024
1 parent d8b8296 commit 04ec5b7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions python/cudf/cudf/pandas/fast_slow_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ def call_operator(fn, args, kwargs):
"EXECUTE_SLOW": 0x0571B0,
}

# This is a dict of functions that are known to have arguments that
# need to be transformed from fast to slow only. i.e., Some cudf functions
# error on passing a device object but don't error on passing a host object.
# for example: DataFrame.__setitem__(arg, value) errors on passing a device
# object as arg but doesn't error on passing a host object.
# Hence we need to transform the arg from fast to slow only. So, we need to
# will arrive at a key-value pair mapping like:
# {"DataFrame.__setitem__": {0}}
# The keys are the names of the functions and the values are the indices of the
# arguments that need to be transformed. The indices are 0-based.

_SPECIAL_FUNCTIONS_ARGS_MAP = {
"DataFrame.__setitem__": {0},
}
Expand Down

0 comments on commit 04ec5b7

Please sign in to comment.