Skip to content

Invert entire Cartesian index blocks - #48

Merged
quinnj merged 2 commits into
mainfrom
maintenance/cartesian-block-complement
Oct 4, 2026
Merged

quinnj merged 2 commits into
mainfrom
maintenance/cartesian-block-complement

Conversation

@quinnj

@quinnj quinnj commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Reading or writing A[Not(CartesianIndices((2:3, 1:2)))] can select the wrong cells: Base expands the block into separate axis selectors, and the inverted-index dispatcher excludes only the first axis. Keep the block together through a lazy vector reshape. A one-dimensional block reuses its coordinate range because its vector reshape is the original object. Fixes #46. Related: #47.

Add 94 checks for partial/full/empty blocks, offset arrays, views, assignment, bounds, zero/one-dimensional selectors and individual/vector Cartesian coordinates, following-index output shape, and multidimensional Boolean prefixes. Use GitHub OIDC for repository coverage uploads, preserve tokenless public fork uploads, and fail CI on upload errors.

Validation: the new tests reproduce incorrect reads, views, and writes on current main. Full suites pass on Julia 1.6.7, 1.10.12, 1.12.6, and 1.13.1 with four threads and bounds checks. An independent 28-check base/head probe passes all checks after the fix. After warmup, index resolution allocates 192 bytes for both four skipped coordinates and 998,001, confirming no block materialization. All six exact-head GitHub checks pass, including project and patch coverage. The stable uploader confirms GitHub OIDC acceptance at the correct InvertedIndices repository for commit 645831ba8734796c35a09b4df8d01fb7e376e914.

Co-authored by Codex

AI disclosure: This work was prepared with assistance from OpenAI Codex.

quinnj added 2 commits October 3, 2026 17:49
Keep Cartesian coordinates together during index conversion so Not excludes the whole block. Reuse a single coordinate range for one-dimensional blocks, and add read, view, write, offset, bounds, and index-context regressions. Authenticate coverage with GitHub OIDC and report upload failures.

AI disclosure: This work was prepared with assistance from OpenAI Codex.
Cover scalar and vector Cartesian coordinates on vector parents, including views. These public indexing cases exercise previously untested coordinate comparison and dimension dispatch.

AI disclosure: This work was prepared with assistance from OpenAI Codex.
@quinnj
quinnj merged commit 9f3da69 into main Oct 4, 2026
6 checks passed
@quinnj
quinnj deleted the maintenance/cartesian-block-complement branch October 4, 2026 00:23
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.

Not wrapping CartesianIndices incorrectly processed by to_indices

1 participant