Skip to content

fix(spec): an absent shift offset reaches no row, whatever the edge - #1185

Draft
FabianHofmann wants to merge 4 commits into
masterfrom
claude/gifted-hopper-vsmmx2
Draft

FabianHofmann wants to merge 4 commits into
masterfrom
claude/gifted-hopper-vsmmx2

Conversation

@FabianHofmann

@FabianHofmann FabianHofmann commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #1184.

Note

The following content was generated by AI.

Changes proposed in this Pull Request

Where a per-entity shift offset is absent, the shift is not defined there, so the row is absent for every edge mode, dense and sparse.

  • _gather_by_offset: keep the absent offset as "not defined" instead of casting NaN to int. edge='wrap' no longer reads x[t=0], and edge=<number> no longer fills it.
  • _gather_in_groups: a fill lands only where the offset is defined, as it already did only where the member is in a group.
  • Test test_an_absent_entity_offset_shifts_to_no_row: edge × within × dense/sparse. 6 of 8 cases fail on master; edge='wrap' with within= was already right.

test/test_spec*.py: 638 passed, 6 skipped. ruff and mypy clean.

Checklist

  • AI-generated content is marked (see AGENTS.md).
  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in doc.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes doc/release-notes.md of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

FabianHofmann commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator Author

Note

The following content was generated by AI.

Check types fails on master since #1179 (6 mypy errors in test/test_spec_api.py, run), not because of this PR. 648e5bd types the dim_order test helpers so it passes here. Drop the commit if a fix lands on master first.


Generated by Claude Code

@codspeed

codspeed Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 181 untouched benchmarks
⏩ 181 skipped benchmarks1


Comparing claude/gifted-hopper-vsmmx2 (648e5bd) with master (ac3eaf7)

Open in CodSpeed

Footnotes

  1. 181 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

This branch has not been deployed

No deployments
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.

spec: shift with an absent per-entity offset reads x[t=0] (wrap) or 0 (edge=0) instead of no row

2 participants