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
For example, let left is a series filled with nan values, and right is a series filled with a real values.
Then left.is_null() returns a series filled with False, and right.is_null() returns a series filled with False.
So both series are considered as same when checking missing values.
both case 1 and case 2 must raise AssertionError: Series are different
however, only case 2 raise AssertionError, whereas case 1 is considered as equal series
@mingi3314; many thanks for the bug report - I found another edge-case while investigating your report, so ended-up extending the assert test coverage and fixing them both 😅
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
assert_series_equal considers both Nan and real value as same.
I think this is because
testing.asserts._assert_series_inner
only check both left and right are null or not.polars/py-polars/polars/testing/asserts.py
Line 188 in b311405
For example, let left is a series filled with nan values, and right is a series filled with a real values.
Then
left.is_null()
returns a series filled with False, andright.is_null()
returns a series filled with False.So both series are considered as same when checking missing values.
Suggestion
So, how about change
polars/py-polars/polars/testing/asserts.py
Line 188 in b311405
If it's okay, can I work on it and submit a pull request?
Reproducible example
Expected behavior
both case 1 and case 2 must raise
AssertionError: Series are different
however, only case 2 raise AssertionError, whereas case 1 is considered as equal series
Installed versions
The text was updated successfully, but these errors were encountered: