You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Equality between a categorical series and another series of the same type as the categories (but not already a categorical) errors. In Pandas this works, handling any needed dtype conversions implicitly.
Steps/Code to reproduce bug
importpandasaspdimportcudfx=pd.Series([1, 2, 1])
x_cat=x.astype("category")
# Equality works fine in pandasx==x_catcx=cudf.Series([1, 2, 1])
cx_cat=cx.astype("category")
# But cudf errorscx==cx_cat
Output:
Traceback (most recent call last):
File "/raid/jcristharif/scikit-learn/examples/compose/bug.py", line 12, in <module>
cx == cx_cat
File "/raid/jcristharif/miniforge3/envs/cuml-dev/lib/python3.12/site-packages/cudf/core/mixins/mixin_factory.py", line 11, in wrapper
return method(self, *args1, *args2, **kwargs1, **kwargs2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/raid/jcristharif/miniforge3/envs/cuml-dev/lib/python3.12/site-packages/cudf/core/indexed_frame.py", line 4903, in _binaryop
type(self)._colwise_binop(operands, op),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/raid/jcristharif/miniforge3/envs/cuml-dev/lib/python3.12/site-packages/cudf/utils/performance_tracking.py", line 51, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/raid/jcristharif/miniforge3/envs/cuml-dev/lib/python3.12/site-packages/cudf/core/frame.py", line 1593, in _colwise_binop
else getattr(operator, fn)(left_column, right_column)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/raid/jcristharif/miniforge3/envs/cuml-dev/lib/python3.12/site-packages/cudf/core/mixins/mixin_factory.py", line 11, in wrapper
return method(self, *args1, *args2, **kwargs1, **kwargs2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/raid/jcristharif/miniforge3/envs/cuml-dev/lib/python3.12/site-packages/cudf/core/column/categorical.py", line 717, in _binaryop
raise ValueError
ValueError
Environment overview (please complete the following information)
Describe the bug
Equality between a categorical series and another series of the same type as the categories (but not already a categorical) errors. In Pandas this works, handling any needed dtype conversions implicitly.
Steps/Code to reproduce bug
Output:
Environment overview (please complete the following information)
Environment details
Click here to see environment details
Additional context
We can work around this in
cuml
for now (at the cost of some extra code).The text was updated successfully, but these errors were encountered: