Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] Verify pa.{Chunked,Integer}Array args to SparseNDArray.read #2234

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

ryan-williams
Copy link
Member

@ryan-williams ryan-williams commented Mar 7, 2024

Issue and/or context

#1791

Changes

Add a test case to test_sparse_nd_array_table_slicing, verifying that pa.ChunkedArray (of integers) and pa.IntegerArray work as SparseNDCoords.

Notes for Reviewer

Ideally we'd have a repro where:

The existing test I've modified here apparently isn't subjected to such runtime type-checking. A more explicit version in 0d93315 also doesn't exhibit a type-check failure. I'll keep looking into how to accomplish that.

@johnkerl
Copy link
Member

johnkerl commented Mar 7, 2024

The existing test I've modified here apparently isn't subjected to such runtime type-checking. A more explicit version in 0d93315 also doesn't exhibit a type-check failure. I'll keep looking into how to accomplish that

This surprises me as we do use typeguard in our unit tests

@ryan-williams
Copy link
Member Author

It seems like typeguard may not be running as intended: #2238

@johnkerl johnkerl changed the title Verify pa.{Chunked,Integer}Array args to SparseNDArray.read [python] Verify pa.{Chunked,Integer}Array args to SparseNDArray.read Mar 7, 2024
@ryan-williams ryan-williams marked this pull request as ready for review March 11, 2024 14:34
@ryan-williams
Copy link
Member Author

This was originally meant to reproduce a typeguard error, pre-single-cell-data/SOMA#187. However, I think it's worth merging as-is, to verify that these pa types work as SparseNDCoords.

@ryan-williams ryan-williams merged commit 9073097 into main Mar 11, 2024
17 checks passed
@ryan-williams ryan-williams deleted the rw/sparse-coords branch March 11, 2024 20:13
johnkerl pushed a commit that referenced this pull request Mar 13, 2024
…2234) (#2263)

Co-authored-by: Ryan Williams <ryan.williams@tiledb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants