-
Notifications
You must be signed in to change notification settings - Fork 891
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
[BUG] cudf.testing.assert_*_equal
raises AssertionError for equivalent DecimalDtype
d objects
#16635
Comments
hi @mroeschke Based on change history
The changes introduce type checks on |
Hypothesiscupy does not fully implement numpy's asarray method, at least dtype does not support ReproduceI try to remove def assert_column_equal(
...
left.apply_boolean_mask(
left.isnull().unary_operator("not")
).values,
...
@property
def values(self) -> cupy.ndarray:
"""
Return a CuPy representation of the Column.
"""
if len(self) == 0:
return cupy.array([], dtype=self.dtype)
if self.has_nulls():
raise ValueError("Column must have no nulls.")
return cupy.asarray(self.data_array_view(mode="write")) will raise
Reproduce the code example:
if numpy import numpy
obj = left.apply_boolean_mask(left.isnull().unary_operator("not"))
numpy.asarray(obj)
if cupy import cupy
cupy.asarray(obj)
|
We'll first need to assert that the dtypes are equivalent then probably use pandas assertion functions instead of cupy/numpy for comparing decimal values |
Describe the bug
Expected behavior
I would expect no
AssertionError
.It appears there's a testing function,
dtype_can_compare_equal_to_other
, used in column comparisons that over-zealously assumes two objects withDecimalDtype
s shouldn't be compared to each other.Environment overview (please complete the following information)
The text was updated successfully, but these errors were encountered: