Repository navigation
Fix: gridA == gridB with equal lon but unequal lat now properly returns False - #1889
Merged
Merged
Conversation
dylannelson
approved these changes
Nov 10, 2026
dylannelson
left a comment
Member
There was a problem hiding this comment.
Good catch! I ran into this confusion once before too like 2 months ago and wasn't sure what was going on. Glad to know there was a reason for it. Thanks for the quick and straightforward change! Works on my end and solves the issue
cmdupuis3
approved these changes
Nov 10, 2026
Open
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1881
Overview
Fixes the underlying issue of
Grid.__eq__checking whetherself.node_lon.equals(other.node_lon) or self.node_lat.equals(other.node_lat)by instead splitting this into a lon comparison check and lat comparison check. Two grids are only equal if they have equal node_lon and equal node_lat.Added code for corresponding regression test into
test/grid/grid/test_core.py'stest_operators_ne, and confirmed locally that this test passes on this branch but fails on main.PR Checklist
General
Testing & Benchmarking
Documentation and Examples
docs/api.rst; internal (private) function names start with an underscore (_)AI Disclosure
AI Usage: GitHub Copilot's inline code suggestions were visible, I might have accepted some of them but I don't recall one way or another.