scverse / spatialdata

An open and interoperable data framework for spatial omics data
https://spatialdata.scverse.org/
BSD 3-Clause "New" or "Revised" License
174 stars 34 forks source link

`_get_unique_label_values_as_index()` should be included as a case of `get_values()` #522

Open LucaMarconato opened 1 month ago

LucaMarconato commented 1 month ago

get_values() should have an argument, like index: bool=False, that should return the index when index=True.

Returning the index of shapes and points is straighforward, but currently for returning the index of single-scale and multi-scale labels we use the private function _get_unique_label_values_as_index(). get_values() would make the access more ergonomic.