Skip to content

Make Record equality return False for unequal signal arrays - #751

Merged
tompollard merged 1 commit into
mainfrom
fix-record-equality
Nov 27, 2026
Merged

tompollard merged 1 commit into
mainfrom
fix-record-equality

Conversation

@tompollard

Copy link
Copy Markdown
Member

Summary

Make Record.__eq__ return False for unequal uniform and expanded signal
arrays, instead of propagating an assertion (or an ambiguous array truth-value
error). Comparing a Record with an unrelated object also returns False.
Matching NaN samples continue to compare equal.

This is a small, compatibility-preserving step toward clarifying the equality
behavior tracked in #749. It does not introduce a new record model or a
data-equivalence API.

Tests

  • Add focused tests for uniform and expanded arrays, NaNs, and unrelated types.
  • Offline suite: 902 passed, 4 skipped, 21 deselected (MPLBACKEND=Agg).
  • Ruff check, Ruff format check, and git diff --check pass.

@tompollard
tompollard merged commit e4313b7 into main Nov 27, 2026
19 checks passed
@tompollard
tompollard deleted the fix-record-equality branch November 27, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant