Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pandas/tests/computation/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,13 @@ def check_alignment(self, result, nlhs, ghs, op):
# TypeError, AttributeError: series or frame with scalar align
pass
else:

# direct numpy comparison
expected = self.ne.evaluate(f"nlhs {op} ghs")
tm.assert_numpy_array_equal(result.values, expected)
# Update assert statement due to unreliable numerical
# precision component (GH37328)
# TODO: update testing code so that assert_almost_equal statement
# can be replaced again by the assert_numpy_array_equal statement
tm.assert_almost_equal(result.values, expected)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a comment why we are doing this and reference to this issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yah i think this makes sense, but should have a TODO indicating that it should be equality and we had to punt


# modulus, pow, and floor division require special casing

Expand Down