single-cell-data / SOMA

A flexible and extensible API for annotated 2D matrix data stored in multiple underlying formats.
MIT License
69 stars 9 forks source link

Add new supported types and improve precision of coordinates #125

Closed thetorpedodog closed 1 year ago

thetorpedodog commented 1 year ago

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 https://github.com/single-cell-data/TileDB-SOMA/issues/933.