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

Add new supported types and improve precision of coordinates #125

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

thetorpedodog
Copy link
Contributor

This removes None from the SparseNDCoords type (since we now accept () as the "return everything" value) and separates a singular SparseNDCoord type out from it.

Also introduces a generic Slice protocol, since there is no stdlib-based type annotation for "a slice of a given type". This is, unfortunately, still not useful at runtime, since slice is always going to resolve to Slice[Any], but the annotation is useful for specification purposes.


This is a roundabout part of fixing single-cell-data/TileDB-SOMA#933.

This removes `None` from the `SparseNDCoords` type (since we now accept
`()` as the "return everything" value) and separates a singular
`SparseNDCoord` type out from it.

Also introduces a generic `Slice` protocol, since there is no
stdlib-based type annotation for "a slice of a given type". This is,
unfortunately, still not useful at runtime, since `slice` is always
going to resolve to `Slice[Any]`, but the annotation is useful for
specification purposes.
@johnkerl johnkerl changed the title Add new supported types and improve precision of coordinates. Add new supported types and improve precision of coordinates Feb 14, 2023
@thetorpedodog thetorpedodog merged commit 4a0d62a into main Feb 14, 2023
@thetorpedodog thetorpedodog deleted the sparsendcoord branch February 14, 2023 18:02
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.

2 participants