Skip to content

Add validation and clean up compressed_axes=None ambiguity in GCXS. - #1015

Merged
hameerabbasi merged 1 commit into
pydata:mainfrom
hameerabbasi:validation-cleanup
Oct 26, 2026
Merged

hameerabbasi merged 1 commit into
pydata:mainfrom
hameerabbasi:validation-cleanup

Conversation

@hameerabbasi

@hameerabbasi hameerabbasi commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • 🪄 Feature
  • 🐞 Bug Fix
  • 🔧 Optimization
  • 📚 Documentation
  • 🧪 Test
  • 🛠️ Other

Related issues

  • Related issue #
  • Closes #

Checklist

  • Code follows style guide
  • Tests added
  • Documented the changes

Please explain your changes below.

@hameerabbasi
hameerabbasi force-pushed the validation-cleanup branch 2 times, most recently from a2cf763 to a1effe9 Compare October 26, 2026 07:59
@hameerabbasi
hameerabbasi merged commit d610898 into pydata:main Oct 26, 2026
17 of 20 checks passed
@hameerabbasi
hameerabbasi deleted the validation-cleanup branch October 26, 2026 08:16
@Eliot5566 Eliot5566 mentioned this pull request Nov 12, 2026
4 of 10 tasks
hameerabbasi pushed a commit that referenced this pull request Nov 13, 2026
* fix: allow GCXS data of any dtype again (#1027)

Since #1015, GCXS.__init__ passes `data` to the jitted
_validate_gcxs_arrays, and Numba can't type float16, object or
longdouble arrays, so building a GCXS from them failed, as did ufuncs
that return float16 (np.sin on int8 data). The check only needs the
length of `data`, so pass that instead. `data.ndim` is already checked
before the call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: validate GCXS with a stand-in for data, leave the jitted check as is

Coverage can't see inside the jitted _validate_gcxs_arrays, so the lines
changed there counted as uncovered. Restore the function and pass a
zero-copy boolean array with the shape of `data` instead, which Numba
can type for any data dtype.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Hq1ACTsK85bRrY28fUQ7b3

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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